Mark Cave-Ayland
adf9834315
Fix for #1088 : Too many columns in select crashes pgsql2shp.
...
Instead of a fixed length query string, dynamically allocate the memory based
upon the sum of the lengths of all of the column names.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7566 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-03 21:47:09 +00:00
Mark Cave-Ayland
baeeefeb22
Update loader regression test suite to add a simple test for shp2pgsql (much as we now do for pgsql2shp).
...
Note that these tests aren't completely comprehensive and should be expanded, with the long term aim
of moving the loader regression tests out of the main regression harness and into CUnit instead.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7551 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-02 13:43:35 +00:00
Mark Cave-Ayland
820efdcc24
Fix up the loader unit tests so that if --with-gui is not passed to configure, the non-GUI tests will continute to run instead of failing compilation.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7550 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-02 12:34:16 +00:00
Mark Cave-Ayland
9bb000bbcc
Another attempt to fix #1080 on Windows - it seems that simply opening and
...
closing a pgsql2shp state object is a good way to find all uninitialised
variables.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7547 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-01 22:36:48 +00:00
Mark Cave-Ayland
5c705a34c8
Revised fix for #1080 based upon backtrace provided by Regina.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7546 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-01 21:37:34 +00:00
Mark Cave-Ayland
1b0e73ba66
Fix #1080 : cunit is crashing on test_ShpDumerDestroy().
...
Looks like the original code omitted to set the default config values causing
the addition of a ShpDumperDestroy() call to fall over on some platforms due
to uninitialised pointers.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7533 b70326c6-7e19-0410-871a-916f4a2858ee
2011-07-01 09:33:28 +00:00
Mark Cave-Ayland
06b5e95f83
Commit rework of #885 (pgsql2shp fields conversion from predefined list).
...
This patch required extra work to ensure that it was a better fit for the
new loader/dumper structure including error reporting, better use of C
coding style and altering various names/code locations as appropriate.
git-svn-id: http://svn.osgeo.org/postgis/trunk@7524 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-29 22:40:54 +00:00
Sandro Santilli
2f3f65e974
Fix libiconv linker flags
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7392 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-14 08:20:16 +00:00
Paul Ramsey
63cd9b8def
Allow cunit tests to build and run in OS/X
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7388 b70326c6-7e19-0410-871a-916f4a2858ee
2011-06-13 20:20:56 +00:00
Sandro Santilli
ebf3d2dc1b
Do not error out if things are clean already
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7028 b70326c6-7e19-0410-871a-916f4a2858ee
2011-04-14 10:38:22 +00:00
Sandro Santilli
91f24b5ef0
Properly clean in loader's cunit test dir
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7027 b70326c6-7e19-0410-871a-916f4a2858ee
2011-04-14 10:36:08 +00:00
Mark Leslie
fd7107cd38
Adding a dbf filter for file selection.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@7023 b70326c6-7e19-0410-871a-916f4a2858ee
2011-04-13 10:25:06 +00:00
Sandro Santilli
a7c93b6306
Ticket #855 by Loic Dachary: pgsql2shp fields conversion from predefined list
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6996 b70326c6-7e19-0410-871a-916f4a2858ee
2011-04-03 19:19:30 +00:00
Paul Ramsey
ec01ab6dc8
Jeff Adams: Changed variables we are storing getopt result in from char to int, since int is the return type from the getopt function. ( #663 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6935 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-18 19:43:25 +00:00
Paul Ramsey
9b394f152f
Jeff Adams: Added regression test for LATIN1 encoding, fixed failure to convert to UTF8. ( #808 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6932 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-18 19:13:26 +00:00
Paul Ramsey
8647121289
Jeff Adams: Per suggestion on #857 , corrected output to indicate table name is optional.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6927 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-18 16:54:18 +00:00
Paul Ramsey
359ab99a41
Jeff Adams: Increasing precision due to tests failing in automatic build.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6925 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-18 16:24:33 +00:00
Paul Ramsey
a2c725a6fb
Fixes the following shp2pgsql issues:
...
#229 : A new "-r" command line parameter to specify a "from" SRID for reprojecting (the existing -s is the "to").
#779 : -S now works for points, and -w is documented.
#864 : MULTIPOINT shapefiles with single-vertex points now correctly load with all MULTIPOINTs.
#865 : no longer crashes when both -g and -G are used.
git-svn-id: http://svn.osgeo.org/postgis/trunk@6922 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-18 15:40:31 +00:00
Paul Ramsey
2db8d4de0e
Jeff Adams patch to add command line flag to not use a transaction. ( #110 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6909 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-16 17:16:47 +00:00
Paul Ramsey
eea9d3470a
Jeff Adams patch to support tablespaces ( #67 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6905 b70326c6-7e19-0410-871a-916f4a2858ee
2011-03-16 13:02:43 +00:00
Regina Obe
4ca2f6a08d
start getting rid of deprecated calls
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6524 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-28 18:22:37 +00:00
Sandro Santilli
67ea552e1b
Only run unit tests when building GUI (See http://postgis.refractions.net/pipermail/postgis-devel/2010-December/011014.html )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6414 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-16 14:35:22 +00:00
Paul Ramsey
26398241e2
Minor usage changes. ( #604 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6374 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-14 05:01:51 +00:00
Paul Ramsey
639ab205d8
Return value of snprintf not correctly checked ( #556 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6360 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-13 20:40:48 +00:00
Paul Ramsey
2a22e258a6
Change default shp2pgsql column to "geom" ( #352 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6358 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-13 20:09:26 +00:00
Paul Ramsey
1ae5b8f68b
ptarray_free now frees the serialized_ptlist, unless FLAGS_GET_READONLY is set.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6340 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-11 00:28:57 +00:00
Paul Ramsey
892caa698a
Remove many instances of lwgeom_getType used on PG_LWGEOM
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6309 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-08 22:31:28 +00:00
Paul Ramsey
b05eea79c6
Rename lwgeom_from_wkt to lwgeom_parse_wkt to note the use of the parser object.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6294 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-08 00:02:31 +00:00
Paul Ramsey
77b08404a5
Start flipping over references to srid = -1 to srid = SRID_UNKNOWN
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6293 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-07 21:59:54 +00:00
Paul Ramsey
4cc4123357
Replace the old WKB/WKT parser and emitters with the new ones.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6291 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-07 21:08:05 +00:00
Paul Ramsey
a907649647
Change i18n instructions to use shp2pgsql_LANG.po as format for po file names.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6267 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-02 20:38:06 +00:00
Paul Ramsey
a3179cc969
Pass iconv header flags to cpp in all cases.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6250 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-02 15:37:16 +00:00
Paul Ramsey
8d5b7d3e0e
Add i18n string wrapper for pgsql2shp utility too.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6245 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-02 03:43:23 +00:00
Paul Ramsey
88f90fa704
First attempt at i18n for the loader/dumper.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6239 b70326c6-7e19-0410-871a-916f4a2858ee
2010-12-02 00:44:24 +00:00
Olivier Courtin
df80a93181
Change SRID to srid in LWGEOM struct (and also in CHIP too). Rename some functions related to SRID from Camel notation to lower case: errorIfSRIDMismatch, pglwgeom_getSRID, pglwgeom_setSRID, LWGEOM_getSRID, LWGEOM_setSRID, hasSRID. Related to #658
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6204 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-25 17:34:21 +00:00
Paul Ramsey
262696c293
Make the ptarray_add_point behavior more explicit.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6190 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-23 00:44:24 +00:00
Olivier Courtin
931390d022
#658 part 1. Enhance LWGEOM struct (type, flags and GBOX) and related functions call.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6180 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-21 19:02:23 +00:00
Paul Ramsey
4afb908dba
An argument for git. This massive commit includes the renaming of function in the ptarray API, the removal of some pointArray_* variants in favor of ptarray_* variants, and, importantly, the adition of _append_point and _insert_point options for pointarrays. Functions have been switched over to using the API instead of managing the serialized_pointlist themselves. This has necessitated the re-writing of some functions. Simplify2d and Force2d have been re-written as lwgeom functions instead of serialized form functions, and moved into liblwgeom. There are still some major functions to move into liblwgeom, including the point_in_polygon functions that support the intersects shortcuts and the linear referencing fuctions in lwgeom_functions_analytic.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6175 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-18 05:28:19 +00:00
Paul Ramsey
805635643d
Remove unused function. Rename lwgeom_is_collection to lwtype_is_collection.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6166 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-02 05:52:32 +00:00
Paul Ramsey
f544929bb3
Remove DYNPTARRAY and all users of it
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6161 b70326c6-7e19-0410-871a-916f4a2858ee
2010-11-01 08:11:06 +00:00
Mark Leslie
79f3c03390
Reverting erroneous changes to pgui_read_connection.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6009 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-23 07:40:04 +00:00
Mark Leslie
3983aac02f
Reverting the default geometry column name change. Got too excited... breathe deep...
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6008 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-22 23:45:35 +00:00
Mark Leslie
aa50208c97
Forcing table names to lower case when initially added.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6001 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-22 05:34:31 +00:00
Mark Leslie
de225beba6
Removing lingering references to the broken icon support.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@6000 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-21 23:22:50 +00:00
Mark Leslie
c9c573ba79
Changing the default geometry name from 'the_geom' to 'geom'
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@5999 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-21 23:12:19 +00:00
Mark Leslie
ad448d6d6a
Changing the default geometry name from 'the_geom' to 'geom'
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@5998 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-21 23:11:35 +00:00
Mark Leslie
b2e8013c76
Clearing some compile warnings and fixing the issue where the test connection button always reported success.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@5995 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-21 03:36:12 +00:00
Mark Cave-Ayland
b38942dfe8
Fix #603 : shp2pgsql: "-w" produces invalid WKT for MULTI* objects.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@5990 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-19 16:56:23 +00:00
Mark Cave-Ayland
f2b4651fa9
Fix #572 : Password whitespace for Shape File to PostGIS Importer not supported. Fixed by adding a new function especially designed for escaping arguments for PQconnectdb strings, and plugging it into the GUI.
...
Note this commit is different from the 1.5 branch version, since the escaping function is moved into a new common library as I can see it being required for the new pgsql2shp CLI in the not too distant future.
git-svn-id: http://svn.osgeo.org/postgis/trunk@5984 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-19 12:11:36 +00:00
Mark Cave-Ayland
db579e6349
Fix #527 : Log window in shp2pgsql-gui should always append text to bottom of window.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@5975 b70326c6-7e19-0410-871a-916f4a2858ee
2010-09-18 15:22:54 +00:00