Paul Ramsey
91a2035bdf
Add untested new p-i-p approach for more testing later.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4595 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-05 19:38:50 +00:00
Paul Ramsey
36e52b4ce1
Increase precision.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4593 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-05 14:37:57 +00:00
Paul Ramsey
c01dd43e99
Add another printing block
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4592 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-05 14:37:05 +00:00
Paul Ramsey
48e130a70b
Added new point-on-edge routine still no joy on bad test case.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4589 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-05 05:05:50 +00:00
Paul Ramsey
b6b33573ac
Add another test case that needs resolution
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4588 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-04 22:26:13 +00:00
Paul Ramsey
94e32a2c16
Some fixes to the ST_DWithin code.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4585 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-04 00:51:00 +00:00
Paul Ramsey
e84c82b667
Fix boner error
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4576 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-01 23:54:58 +00:00
Paul Ramsey
0396a0468c
ST_Distance(geography, geography) roughed in. Small detail, currently returns answers in radians. :)
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4573 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-01 19:50:44 +00:00
Paul Ramsey
f3a7f0882e
Add polygon/point distance and tests.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4572 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-01 18:45:59 +00:00
Paul Ramsey
255cb5ea13
Wow, error that only showed up in MinGW, but totally an error. I wonder why my test passed this... clean memory I guess.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4571 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-01 14:52:03 +00:00
Paul Ramsey
68dab94cd0
lwgeom sphere distance function and tests for point/linestring
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4570 b70326c6-7e19-0410-871a-916f4a2858ee
2009-10-01 05:53:07 +00:00
Paul Ramsey
a9848bdc11
Roughing in lwgeom distance machinery now.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4569 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 23:59:01 +00:00
Paul Ramsey
a5615bafed
Add edge-edge distance tests.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4568 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 23:03:29 +00:00
Paul Ramsey
0c179ca6e8
Add return value for point of closest approach on arc/edge distance.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4567 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 21:45:58 +00:00
Paul Ramsey
ef1d4148b2
Add edge-to-point distance calculation and tests
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4566 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 21:21:10 +00:00
Paul Ramsey
da11d36978
Remove CPU intensive test and add some lat/lon utility functions
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4565 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 19:34:29 +00:00
Paul Ramsey
26074368b3
Make point-in-edge test even looser (fp tolerance factor)
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4564 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 19:02:27 +00:00
Paul Ramsey
4983e1287f
Move defines around a bit.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4563 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 18:57:23 +00:00
Paul Ramsey
f83ade8204
Add some debugging blocks for later
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4562 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 18:54:02 +00:00
Paul Ramsey
90efe1aa6f
Add in special case test for parallel / equal edges.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4561 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 18:28:26 +00:00
Paul Ramsey
a9772fdd2e
Whoops, make sure we test all our test cases.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4560 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 17:12:23 +00:00
Paul Ramsey
a7561ec499
Make random brute force test a compile-time option.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4559 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 17:09:35 +00:00
Paul Ramsey
95a9d05853
Add more test cases for geocentric bbox calculation and make 'in cone' test inclusive of end points.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4558 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 17:05:44 +00:00
Paul Ramsey
8ad9bf5dd5
Re-enable all geodetic tests.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4554 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 00:17:10 +00:00
Paul Ramsey
69ef5e8eb1
Add some extra comments
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4553 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-30 00:11:20 +00:00
Paul Ramsey
cd8e7ff4a7
astyle the work thus far
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4552 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-29 20:44:28 +00:00
Paul Ramsey
a71f3b2d83
Flip the clairaut calculations to return both top and bottom in one go.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4551 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-29 20:41:04 +00:00
Paul Ramsey
12a7c802ae
Remove old GBOX test answers (some were wrong!) in favor of actual slow calculations
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4550 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-29 19:53:39 +00:00
Paul Ramsey
2ac92a420d
Add randomized box maker/checker... still some small errors?
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4549 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-29 19:50:36 +00:00
Paul Ramsey
6ead7c9f4b
Make polygon pole check a little more general.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4548 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-29 19:02:09 +00:00
Paul Ramsey
c8ec0a6408
All bbox test cases now pass. Suck on that!
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4547 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-29 18:48:47 +00:00
Paul Ramsey
e9a6297769
Remove un-used function from testing.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4544 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-29 14:40:48 +00:00
Paul Ramsey
43f7f50628
Work on making "on edge" test more reliable.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4543 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-29 14:39:54 +00:00
Sandro Santilli
867210851c
Ensure lwcollection_segmentize2d always return a NEW geometry. Fixes ticket #254 . Add regression test for that bug.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4542 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-29 13:31:20 +00:00
Paul Ramsey
083f26fef4
Test re-org and first cut at edge intersection.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4537 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-28 22:45:37 +00:00
Regina Obe
851a729f6b
remove regex.h include per Nicklas observation its still in there.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4533 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-25 13:32:14 +00:00
Mark Cave-Ayland
1f6d0724d4
Commit fix to LW_ABS() macro as discovered by Nicklas Aven.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4527 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-22 13:38:17 +00:00
Mark Cave-Ayland
991c2d233f
Oops - forgot to bump the array indices on the last commit :(
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4524 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-22 11:53:47 +00:00
Mark Cave-Ayland
780565b14b
Add missing geometry(m)(z) type missing from previous commit.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4521 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-22 11:23:30 +00:00
Mark Cave-Ayland
0b6f67024b
Remove dependency on regex library by implementing the same functionality using standard C functions. Passes regression tests for me.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4520 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-22 11:13:33 +00:00
Paul Ramsey
497342b2da
Clean up tests so they pass quietly. ( #249 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4512 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-18 14:53:25 +00:00
Regina Obe
e0f6d5c6ee
#250 : Fix to get mingw to compile using conditional -lregex
...
Had to change configure.ac too so -lregex is not put in if its built-in.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4511 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-18 14:10:55 +00:00
Paul Ramsey
2342776218
Fix serialization problem with lwgeoms that have bboxes.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4509 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-17 05:57:12 +00:00
Paul Ramsey
51dbcb9bbf
Clean up gbox serialization a little
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4508 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-17 05:33:35 +00:00
Paul Ramsey
5635299b47
Add lwgeom_is_empty() test
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4507 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-17 02:33:49 +00:00
Paul Ramsey
6699aa3199
Work on tracking down bug in casting geometry->geography
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4506 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-17 00:01:53 +00:00
Paul Ramsey
c9c61193ca
Fix some test cases crossing the date line
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4505 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-16 22:43:20 +00:00
Paul Ramsey
2f24c23327
Add gbox string constructor for testing purposes
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4504 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-16 21:09:24 +00:00
Paul Ramsey
154a0f5bcb
More tests pass
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4503 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-16 20:19:20 +00:00
Paul Ramsey
bedb088622
Change back to less intensive cartesian clairaut
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4502 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-16 18:54:24 +00:00
Paul Ramsey
40cd5b1e72
Fix errors in calculating geocentric bounds. Early test cases now pass!
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4501 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-16 18:50:54 +00:00
Paul Ramsey
e153da7079
Hook geocentric calculation into gbox routines, start testing
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4500 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-15 21:21:27 +00:00
Paul Ramsey
03cbe95845
Geocentric bounding box roughed in and compiles.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4499 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-15 19:50:24 +00:00
Paul Ramsey
34f03aa8cd
Start the geodetic machinery. Add an internal API header for eventual API rationalisation
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4498 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-14 20:30:35 +00:00
Paul Ramsey
06568b44d1
Crib index penalty tweak from pgsphere.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4497 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-14 18:33:54 +00:00
Paul Ramsey
82acc2b19c
Add FP_EQUALS and bracket arguments for a little extra safety
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4496 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-14 18:15:18 +00:00
Mark Cave-Ayland
b7d587678b
Merge Paul's geodetic (geography) branch into trunk, as per discussions on postgis-devel. Most of the merge was automatic (albeit quite slow), with a few manual touch-ups where the merge algorithm couldn't handle this automatically. "make check" runs and passes, so I hope I haven't managed to break too much ;)
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4494 b70326c6-7e19-0410-871a-916f4a2858ee
2009-09-14 10:54:33 +00:00
Mark Leslie
3eddf6078b
Fix for ticket #234
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4366 b70326c6-7e19-0410-871a-916f4a2858ee
2009-08-07 03:38:24 +00:00
Mark Cave-Ayland
91a55bceb1
Move SERIALIZED_FORM to lwgeom_pg.h from liblwgeom.h since it references a PostgreSQL-only structure. Per report from Nicklas Aven.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4310 b70326c6-7e19-0410-871a-916f4a2858ee
2009-07-16 21:32:48 +00:00
Paul Ramsey
491022206d
MinGW fix for loader ( #222 ), Mark Cave-Ayland
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4293 b70326c6-7e19-0410-871a-916f4a2858ee
2009-07-13 17:27:41 +00:00
Mark Cave-Ayland
ec12af9d42
Fix #112 : ST_CurveToLine sometimes crashes server. While the circle segmentiser detected colinear circle points, it didn't check for the
...
NULL pointer returned in this case. Since we are converting to a line, the current behaviour is to simply append the circle points as s
tandard line points.
git-svn-id: http://svn.osgeo.org/postgis/trunk@4272 b70326c6-7e19-0410-871a-916f4a2858ee
2009-07-08 04:59:19 +00:00
Mark Cave-Ayland
5812cc0cbe
Fix #183 : ST_LineToCurve gives getPoint4d_p offset error. This was due to the lookahead in the curve segmentising code going off the end of the point array.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4270 b70326c6-7e19-0410-871a-916f4a2858ee
2009-07-08 04:48:54 +00:00
Mark Cave-Ayland
02fb778cb7
Fix compile problems on non-GNU systems by using va_copy as an alias onto the real version. Per report from Stefano Bonnin.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4264 b70326c6-7e19-0410-871a-916f4a2858ee
2009-07-07 10:33:23 +00:00
Mark Leslie
10d24712cd
Making the changes from r4244 and r4245 onto trunk, addressing ticket 212.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4246 b70326c6-7e19-0410-871a-916f4a2858ee
2009-07-02 08:31:24 +00:00
Mark Leslie
ecdf5dbad3
Enabling the compound curve parsing for segmentisation; reported in ticket 213
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4232 b70326c6-7e19-0410-871a-916f4a2858ee
2009-06-30 07:46:40 +00:00
Mark Leslie
38518df9a3
First swing at ticket 212.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4231 b70326c6-7e19-0410-871a-916f4a2858ee
2009-06-30 07:35:37 +00:00
Regina Obe
089c55720d
fix commenting style so function descriptions are picked up by doxygen
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4210 b70326c6-7e19-0410-871a-916f4a2858ee
2009-06-25 03:03:42 +00:00
Sandro Santilli
85eee8d457
Handle empty polygon rings
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4187 b70326c6-7e19-0410-871a-916f4a2858ee
2009-06-20 21:25:15 +00:00
Paul Ramsey
cfb44a749f
astyle --style=ansi --indent=tab ( #133 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4168 b70326c6-7e19-0410-871a-916f4a2858ee
2009-06-11 16:44:03 +00:00
Mark Cave-Ayland
709784580a
Further fix for #156 , and also #167 it seems. Looks like I forgot to apply the fix to the WKB routines aswell.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4165 b70326c6-7e19-0410-871a-916f4a2858ee
2009-06-11 13:28:39 +00:00
Mark Cave-Ayland
2c9c365a5c
Remove a double-free bug caused if the unparser finds an invalid geometry ( fixes #168 )
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4078 b70326c6-7e19-0410-871a-916f4a2858ee
2009-05-09 12:34:55 +00:00
Regina Obe
75bded91e6
more doxygen comment cleanup
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4064 b70326c6-7e19-0410-871a-916f4a2858ee
2009-05-04 18:00:05 +00:00
Regina Obe
c0f793bb3d
make function doc doxygen friendly
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4060 b70326c6-7e19-0410-871a-916f4a2858ee
2009-05-03 03:58:20 +00:00
Regina Obe
dcf59b11bb
make function descriptor doxygen friendly
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4059 b70326c6-7e19-0410-871a-916f4a2858ee
2009-05-03 03:50:27 +00:00
Regina Obe
abf5606427
change commenting style to javadoc style
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4057 b70326c6-7e19-0410-871a-916f4a2858ee
2009-05-03 03:16:42 +00:00
Regina Obe
03a2f489ee
make function descriptions doxygen friendly
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4053 b70326c6-7e19-0410-871a-916f4a2858ee
2009-05-02 07:13:14 +00:00
Regina Obe
5d6d32a28e
Experimenting with Doxygen hyperlinking tags
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4052 b70326c6-7e19-0410-871a-916f4a2858ee
2009-05-02 06:27:31 +00:00
Regina Obe
9ca2b3a643
More experimentation with doxygen commenting styles
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4051 b70326c6-7e19-0410-871a-916f4a2858ee
2009-05-01 22:47:19 +00:00
Regina Obe
6a7aeb06ab
More auto doc friendlying
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4049 b70326c6-7e19-0410-871a-916f4a2858ee
2009-05-01 04:26:12 +00:00
Regina Obe
d19c4c6578
typo
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4048 b70326c6-7e19-0410-871a-916f4a2858ee
2009-05-01 04:24:41 +00:00
Regina Obe
5711186fe7
experiment with making our inline comments more doxygen friendly
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@4047 b70326c6-7e19-0410-871a-916f4a2858ee
2009-05-01 04:24:13 +00:00
Paul Ramsey
cc70f099f6
Fix for collection vs collection distance behavior. Per Nicklas Avén. GBT #146
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3967 b70326c6-7e19-0410-871a-916f4a2858ee
2009-04-05 16:48:11 +00:00
Mark Cave-Ayland
f7de53897c
More cleanup work based upon Mateusz's MSVC patches; remove references to unistd.h and sys/param.h since they are no longer required for determining endian-ness.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3877 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-16 23:06:58 +00:00
Mark Cave-Ayland
7cbd1b301d
More MSVC fixes from Mateusz related to ISO C++ vs. C99 variable initialisation.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3848 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-10 21:29:14 +00:00
Mark Cave-Ayland
5c9f6a77d2
Fix for GBT#132: Make check should run CUnit. This is to aid developers as we move the majority of the testing framework over to CUnit.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3842 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-10 20:25:09 +00:00
Mark Cave-Ayland
1431cf1cf9
Remove compiler warning from commit r3821.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3839 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-10 19:37:47 +00:00
Mark Cave-Ayland
7172fef0d5
Augment comment related to Paul's fix for GBT#130 as I'm bound to forget why we decided to do this at a later date...
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3831 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-10 16:26:09 +00:00
Olivier Courtin
3590185d1a
Add circstring release and LWGEOM conversion entry
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3830 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-10 16:24:50 +00:00
Mark Cave-Ayland
b5b6d21a4e
Remove some GCC-isms from the unparser related to setting array sizes at run-time rather than compile time. Per report from Mateusz Loskot.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3828 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-10 16:18:52 +00:00
Paul Ramsey
3ce0132d1e
Fix for GBT #130 , remove bdpoly regression failure.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3826 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-10 15:12:11 +00:00
Mark Leslie
488d11cba9
Moving parser changes from spike/mleslie/parser to allow the proper nesting of compound curves within curve polygons and the validation of compound curve continuity. This also resolves GBT#124.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3821 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-10 00:29:32 +00:00
Paul Ramsey
84ede471af
Fix for GBT#96.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3817 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-09 18:40:23 +00:00
Paul Ramsey
d51eb698c6
More camel-case changes.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3814 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-09 15:34:00 +00:00
Paul Ramsey
d982ee5a01
Remove some camelCase function signatures from liblwgeom
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3812 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-09 14:36:15 +00:00
Paul Ramsey
254e6bdcbb
Fix goof in box2d computation.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3809 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-08 21:41:23 +00:00
Paul Ramsey
c7016a23a1
Fix for GBT#112
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3807 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-08 21:15:00 +00:00
Paul Ramsey
919bac6d62
Fix for GBT #116 , EMPTY hex polygon no longer causes crash.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3803 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-08 15:37:27 +00:00
Paul Ramsey
4a0aa3ee8e
Fix tests to match current geohash signatures (lon/lat) and precisions (odd and even)
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3789 b70326c6-7e19-0410-871a-916f4a2858ee
2009-03-03 18:00:52 +00:00
Sandro Santilli
5c20f8b020
Fix parse_hex to support lower-case A-F too (issue 120)
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3762 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-23 15:19:37 +00:00
Paul Ramsey
87ee4ab726
Bind ST_GeoHash into SQL.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3688 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-11 21:48:13 +00:00
Paul Ramsey
54be933339
GeoHash implementation first cut.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3685 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-11 02:11:24 +00:00
Paul Ramsey
cdfcc4e366
Propset Author Id Keyword Revision on all files.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3639 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-04 00:28:37 +00:00
Paul Ramsey
50dd669d16
Formating
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3638 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-04 00:23:38 +00:00
Paul Ramsey
95b47138a2
Fix boundary conditions with from==to hitting first/list vertex.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3637 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-03 20:51:04 +00:00
Mark Cave-Ayland
e943ad97e7
Fix GBT#109: Some operators not supported for Circular. In this case I haven't added the comparison code as I am not 100% sure on the semantics, but the error message should be much clearer to users now.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3636 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-03 19:09:48 +00:00
Paul Ramsey
ac805bda91
astyle this file
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3621 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-03 01:59:05 +00:00
Paul Ramsey
cb026d28fd
formatting
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3619 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-02 22:21:27 +00:00
Mark Leslie
0974feec6b
Fix for Issue 108 and regress test.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3605 b70326c6-7e19-0410-871a-916f4a2858ee
2009-02-02 06:01:27 +00:00
Paul Ramsey
1893da945c
First revision of the GUI. Configure using --with-gui to enable full GUI build. New core/cli will build by default. Old utilities remain in place for now.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3538 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-19 21:33:14 +00:00
Paul Ramsey
953347a200
Remove missing prototype warning from build.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3527 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-14 17:46:00 +00:00
Mark Cave-Ayland
d88132f39f
Fix compile warnings for the cunit tests (unused variables).
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3523 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-13 13:12:15 +00:00
Mark Cave-Ayland
580a6b862d
Update lwgeom_gettypename() by renaming Curve to CircularString. Now lots of error messages scattered throughout liblwgeom should start to make sense...
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3522 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-13 13:00:48 +00:00
Mark Cave-Ayland
862fd30292
Rearrange liblwgeom.h as per Paul's comment on GBT#97: Rename LWCURVE to LWCIRCSTRING. Also rename lwfree_circstring() to lwcircstring_free() so that it matches the others (I guess this was missed in the first pass).
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3521 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-13 12:59:03 +00:00
Mark Cave-Ayland
ce6b5889c8
Commit for GBT#97: Rename LWCURVE to LWCIRCSTRING (also know as restoring balance to the universe).
...
Having gone through and re-read sections of the CIRCULARSTRING code, it is amazing how much easier the code is to read without the confusion of a curve being either a CIRCULARSTRING or LINESTRING as per the SQL-MM spec. The resulting commit compiles & installs cleanly for me, passes "make check" and also Regina's torture script. Please let me know if I accidentally broke anything :)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3520 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-13 12:27:39 +00:00
Paul Ramsey
e35e08942e
Remove double-free problem from loader in presence of new deep-freeing lwfree calls.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3519 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-12 19:29:57 +00:00
Mark Cave-Ayland
203e6d1709
Remove erroneus merge from r3502 (HAVE_CUNIT_H just isn't defined anymore...)
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3515 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-12 12:23:11 +00:00
Paul Ramsey
8fe9ec35db
Rename lwfree_inspected to lwinspected_release, per it's "shallow free" behavior.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3511 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-09 19:17:03 +00:00
Paul Ramsey
6744f68423
Rename lwfree_* to *_free.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3510 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-09 17:41:23 +00:00
Paul Ramsey
825548243f
Alter lwfree_* to deep-free memory. Add variants of *_release to support shallow-free. Go through lwgeom/ and replace any lwfree_* instances with *_release where appropriate. (Surprisingly few.)
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3502 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-08 17:04:00 +00:00
Mark Cave-Ayland
aee626b51d
Bump some LWDEBUG(F) from level 1 up to levels 3-4 (level 1 is reserved)
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3496 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-07 12:11:15 +00:00
Mark Cave-Ayland
5d1472ea60
Allow CPPFLAGS/LDFLAGS parameters from the command line to be passed into the CUnit Makefile, since CUnit is the only dependency that cannot determine its own flags using a --with-X parameter. This allows CUnit to be installed in a non-standard location if required.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3494 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-05 20:54:12 +00:00
Mark Cave-Ayland
7aff0181c9
Rework the CUnit detection infrastructure as you can't locate include files based on an absolute path. This is because autoconf and the compiler have differing ideas of the current paths (this totally breaks the Win32 build since you have the extra mapping between UNIX-type MingW paths and Windows-type paths). Hopefully this should not affect existing users at all - if so, please post a report on -devel. I'll try running this on MingW at a later date.
...
I've also enforced "make check" to run the unit tests, rather than "make test". This is a fallout from the early days when strk committed the regression test suite to run using "make test" by accident which appears to have stuck :(
.
git-svn-id: http://svn.osgeo.org/postgis/trunk@3492 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-05 00:08:26 +00:00
Mark Cave-Ayland
53a1050f3e
Fix comment in lwgeom_from_ewkt() and also add a quick error check to lwgeom_from_ewkt() and lwgeom_from_ewkb() - otherwise upon parse failure we could pass a half-baked geometry back to the caller which would not be good :(
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3491 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-04 20:39:11 +00:00
Mark Cave-Ayland
51d64b41ec
Update the cunit tests to use the proper parser flag PARSER_CHECK_NONE rather than the hard-coded zero.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3490 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-04 20:11:03 +00:00
Mark Cave-Ayland
10e549d288
Add -lm to the cu_tester link line - we must always add this to the link line for anything that links agains liblwgeom.a (at least on my Linux system here)
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3489 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-04 19:54:47 +00:00
Mark Cave-Ayland
476a5aaff7
Commit quick fix for GBT#85: ST_Distance crashes on Circular String. Rather than devise and implement a set of distance functions for CIRCULARSTRINGs, I've simply added code to detect the condition and throw an "Unsupported geometry type" error, similar to as already exists within the codebase.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3487 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-04 19:24:22 +00:00
Paul Ramsey
761363721f
Fix based on test case from MAC.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3482 b70326c6-7e19-0410-871a-916f4a2858ee
2009-01-01 00:31:47 +00:00
Paul Ramsey
884fb23dca
Add support for multilinestring to st_locatebetweenelevations
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3481 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-27 22:58:08 +00:00
Paul Ramsey
fc75e88e49
Add mline version of clipper.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3479 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-24 20:15:51 +00:00
Paul Ramsey
8d86d8a685
Add lwfree_geom to generically deep-free lwgeometries.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3478 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-24 17:37:53 +00:00
Paul Ramsey
ef07ad13f5
Add lwgeom_from_ewkt and change larger cunit tests to create candidate geometries from text instead of by hand.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3477 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-24 17:09:18 +00:00
Mark Cave-Ayland
0445ea11f8
Try and commit a pre-generated output from flex that works for the build-bot.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3476 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-24 00:32:46 +00:00
Paul Ramsey
710d8f217f
Revert accidental commit of lex.yy.c
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3475 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-23 22:11:12 +00:00
Paul Ramsey
6331a05708
Rename new functions to ST_LineCrossingDirection and ST_LocateBetweenElevations for more explicitness and closer correspondance to SQL/MM, respectively. Add a new geometry counter for collections.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3474 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-23 20:20:48 +00:00
Paul Ramsey
7f7be31b65
Add CUnit to main 'make test' build and check for existance of CUnit.h as part of ./configure
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3472 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-22 23:37:58 +00:00
Mark Cave-Ayland
531187a0be
Remove the few C++-style comments that have crept into the codebase, and add a note to the STYLE document stating that C-style comments should be used.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3462 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-22 12:15:12 +00:00
Mark Cave-Ayland
6d5f842d1f
Errr.... unsigned *what* exactly??! If you'd have asked me yesterday if I thought this would compile, I would have said no...
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3460 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-22 11:38:04 +00:00
Mark Cave-Ayland
0fb38f2cff
Some code tidy-ups: remove Windows CR/LFs from the file, change the free()s into lwfree()s, and fix a spelling mistake.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3459 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-22 11:11:09 +00:00
Paul Ramsey
f95ff43d43
Add ST_LineClipZ(geometry, from, to) SQL and C functions.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3456 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-21 06:37:16 +00:00
Paul Ramsey
2d6e86fd95
Complete c-level line clipping routines, and unit tests.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3455 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-19 19:21:37 +00:00
Paul Ramsey
ef6ca1b8bb
Add in lwfree_* deep memory clean-up routines for multi-objects.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3454 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-19 19:20:34 +00:00
Paul Ramsey
78c109c5c4
Complete the pfree_ to lwfree_ renaming.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3450 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-18 20:42:09 +00:00
Paul Ramsey
d7bafd67d0
Move curve back down below curve struct. Hm.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3449 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-18 20:36:21 +00:00
Paul Ramsey
d33c9f9c04
Complete the pfree_* to lwfree_* renaming.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3448 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-18 20:35:27 +00:00
Paul Ramsey
4dc0a4cf91
Rename pfree_* memory management function lwfree_*
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3447 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-18 20:30:30 +00:00
Paul Ramsey
0cef5b2262
Partial work commit for safety
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3446 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-18 20:22:07 +00:00
Paul Ramsey
724161d19c
Partial work saved back for later.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3440 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-18 00:54:04 +00:00
Paul Ramsey
bdebdb6903
Partial work into SVN where I can get at it elsewhere.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3439 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-17 20:47:36 +00:00
Mark Cave-Ayland
1d40f4e51d
#HISTORY: Really fix what was broken in r3431/3432. See the notes there for the full detail.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3436 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-17 19:37:32 +00:00
Paul Ramsey
b93970cd9b
Re-locate cunit, add a STYLE guideline draft and some TODO notes.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3435 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-17 18:20:18 +00:00
Mark Cave-Ayland
aa91cc32b8
Undo r3431/3432: this isn't ready for the primetime yet as it breaks a couple of the regression tests.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3433 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-17 16:03:31 +00:00
Mark Cave-Ayland
b78c5c500d
Fix for one of Regina's torture failures as posted to the -devel list here: http://postgis.refractions.net/pipermail/postgis-devel/2008-December/004362.html . A CurvePolygon has a "standard header" and so must be passed through a function that understands the optional existence of SRIDs/BBOXes etc. in the header.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3431 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-17 15:01:50 +00:00
Paul Ramsey
f1b85dc426
harmonize function names so things... compile
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3429 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-17 05:32:03 +00:00
Paul Ramsey
fdac73d9a9
Revisison per MCA and (c) headers.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3428 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-17 05:28:54 +00:00
Paul Ramsey
500fe3af33
Basic co-linearity support. Remove touching cases from crossingdirection.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3426 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-17 00:19:27 +00:00
Paul Ramsey
04d43077be
Add ST_CrossingDirection(line, line) bindings into SQL.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3425 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-16 23:43:02 +00:00
Paul Ramsey
768cd3ac72
First cut of line crossing function, and associated cunit tests.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3424 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-16 22:29:42 +00:00
Mark Cave-Ayland
29ec5b20ad
Increase the amount of allocated memory by 3 bytes, so that if maxlength < 3 and we return just "..." then we still have enough space to store the string without clobbering memory.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3376 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-11 14:55:21 +00:00
Mark Cave-Ayland
ddbd8474f5
Fix up a couple of errors in the new lwmessage_truncate() function found by Kevin - correct an off-by-one error in the code, and include a missing startpos offset in the end truncation code. Also ensure that if maxlength gets too small then we return "..." rather than crashing.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3375 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-11 13:46:29 +00:00
Mark Cave-Ayland
47d116374a
Resolve local merge conflict from previous commit.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3374 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-10 12:36:28 +00:00
Mark Cave-Ayland
f86114f64c
Add new lwmessage_truncate() function to liblwgeom that will truncate a string to a maximum number of characters, adding a "..." to indicate where the string has been trimmed. Truncation can be specified to occur from either the start or end of the string as required. Also update the parser error handler to use the new function.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3373 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-10 12:32:40 +00:00
Mark Leslie
9bb3d0bde7
Porting the floating point comparison operator upgrade from the 1.3 branch.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3372 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-09 23:29:31 +00:00
Regina Obe
c587643fc2
#GBT 80: ST_Multi seg faults when given MULTILINESTRING
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3362 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-05 12:33:20 +00:00
Mark Cave-Ayland
e24e85a3ed
Lightbulb moment: the fix for GBT#21: locate_along_measure: wrong values, invalid data required extra work as floating point errors could still be introduced by the removal of the memcpy(). In fact it was the clipping logic that was wrong, so this patch re-adds the memcpy() in the correct place(s) and corrects the clipping flags to remove this floating point error. With thanks to Stephen Davies.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3357 b70326c6-7e19-0410-871a-916f4a2858ee
2008-12-03 16:02:32 +00:00
Mark Cave-Ayland
0835b2fb6d
Apply patch from strk to prevent unneccesary invocation of 'ar' when building liblwgeom.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3340 b70326c6-7e19-0410-871a-916f4a2858ee
2008-11-26 13:40:07 +00:00
Mark Cave-Ayland
cb938b7564
Move lwgeom_contains_subgeoms() into liblwgeom core as it seems it is now required outside of lwgeom_dump.c.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3324 b70326c6-7e19-0410-871a-916f4a2858ee
2008-11-24 11:01:39 +00:00
Mark Cave-Ayland
678e623139
Add missing lwgeom_getcurve_inspected() function which is required for some of the latest GBT fixes.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3275 b70326c6-7e19-0410-871a-916f4a2858ee
2008-11-07 14:05:53 +00:00
Mark Cave-Ayland
77d5b7c78e
Fix for GBT#68 - ST_Shift_Longitude doesn't work with MULTIPOINT. Looks like this was just a simple mistake in the code. I've also improved the error message to return the proper type name instead of just a number.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3253 b70326c6-7e19-0410-871a-916f4a2858ee
2008-11-05 11:06:22 +00:00
Mark Cave-Ayland
7b54f79534
Fix lwgeom_typename() not returning a valid string for any of the newer geometry types.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3243 b70326c6-7e19-0410-871a-916f4a2858ee
2008-11-04 14:09:53 +00:00
Mark Cave-Ayland
f27e3fcbb5
Add missing serialized_lwgeom_from_hexwkb() function to liblwgeom which is required for adding liblwgeom support to pgsql2shp.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3223 b70326c6-7e19-0410-871a-916f4a2858ee
2008-10-31 10:41:37 +00:00
Mark Cave-Ayland
8e173fb266
Update the LWGEOM parser to provide error HINTs when being called from PostgreSQL, and update regression tests accordingly.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3113 b70326c6-7e19-0410-871a-916f4a2858ee
2008-10-15 15:03:54 +00:00
Mark Cave-Ayland
e28c430e58
Nearly finish work on the new parser API. The key part of this patch is to alter the behaviour of the parser so that instead of generating errors directly, it returns an error code, error location and an error message. Hence the caller is now in charge of the behaviour when parsing invalid geometries, and so can ignore errors or proceed onto the next geometry if required. The regression test change is due to a change in an error message, since the error is now returned from the unparser before it even gets to GEOS.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3106 b70326c6-7e19-0410-871a-916f4a2858ee
2008-10-14 19:51:24 +00:00
Mark Cave-Ayland
2f63d64292
Rename parser_check_flags to current_parser_check_flags and unparser_check_flags to current_unparser_check_flags to clarify that these status variables only reflect the checks enabled for the current parse.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3095 b70326c6-7e19-0410-871a-916f4a2858ee
2008-10-13 13:16:14 +00:00
Mark Cave-Ayland
4227c1e549
Move the liblwgeom unparser example over to the dynptarray API which is the proper way to alter point arrays in memory.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3094 b70326c6-7e19-0410-871a-916f4a2858ee
2008-10-13 13:03:23 +00:00
Mark Leslie
e23659e1a0
Rebuilt the box3d generation for circular strings to account for a special large-arc case. Fix for issue 58, includes regression test for the case.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3080 b70326c6-7e19-0410-871a-916f4a2858ee
2008-10-08 10:14:46 +00:00
Mark Cave-Ayland
971be1e74a
Fix stupid mistake in the liblwgeom parser...
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3067 b70326c6-7e19-0410-871a-916f4a2858ee
2008-10-05 17:33:03 +00:00
Mark Cave-Ayland
74949bc755
Update LWGEOM unparser to (E)WKT/WKB to resturn a LWGEOM_UNPARSER_RESULT structure instead of just the WKT/WKB character array. This is the same work done for r3023 but applied to the unparser instead.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3026 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-28 19:48:17 +00:00
Mark Cave-Ayland
137120a034
With the advent of LWGEOM_PARSER_RESULT, it is now possible to get rid of the horrible SERIALIZED_LWGEOM hack for PostgreSQL 8.3 to allow us to return the size separate from the result. This is good as it removes another level of indirection from the parser. Note that the size field has now been added to the LWGEOM_PARSER_RESULT structure.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3025 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-28 16:18:12 +00:00
Mark Cave-Ayland
b6083bfddc
Update (E)WKT/WKB parser to return a structure (LWGEOM_PARSER_RESULT) instead of just the serialized lwgeom. This is in preparation for returning more detailed error information back to the caller.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3023 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-28 15:32:46 +00:00
Mark Cave-Ayland
ddc7e96a1d
Rename parser_check_flags to unparser_check_flags for the unparser to prevent linking error under OS X. Also add missing function prototype to silence compiler warning in the PiP code.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3021 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-27 08:19:18 +00:00
Mark Cave-Ayland
a6a0bbc574
Add parser flags to the LWGEOM to (E)WKB/WKT parsers, similar to has already been done for the (E)WKB/WKT to LWGEOM parsers.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@3012 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-25 21:50:19 +00:00
Mark Cave-Ayland
e3a4081c51
Use __va_copy() to pass a copy of the variadic structure to lw_vasprintf() to solve ABI difference between 32bit/64bit architectures.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2998 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-23 21:32:19 +00:00
Mark Cave-Ayland
442d938075
Revert commit 2990: the real bug was that the LWDEBUG statement was incorrect rather than the code - the additional read_int() was causing an off-by-one error when outputting WKB causing several regression tests to fail.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2996 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-23 19:53:12 +00:00
Mark Cave-Ayland
b53c6b8ebb
Refactor the memory management routines to account for the fact that variadic functions can't be called directly from the initial allocators. Also solve issues related to differences between the system vasprintf() (if supplied) and the liblwgeom vasprintf() by renaming to lw_vasprintf() and using it throughout PostGIS. With all this in place, GBT#54 is fixed which is very useful when debugging ;)
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2995 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-23 19:44:57 +00:00
Paul Ramsey
2b6e3d5b0b
Add cnt declaration where missing.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2990 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-22 22:59:47 +00:00
Mark Cave-Ayland
248a9bcb69
Update the code for unparsing LWGEOMs to WKB/WKT so that it includes the standard simple checks: LINESTRINGs must have > 2 points, POLYGONs must have closed rings and CIRCULARSTRINGs must have > 2 points and the number of points must be odd. There is still a little more work to do to allow flags to be passed into the parser to specify which checks should be enforced, much like has already been done for the parsing from WKB/WKT to LWGEOM.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2983 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-18 13:54:05 +00:00
Mark Cave-Ayland
552023181f
Silence a few more compiler warnings that had appeared during my last few parser commits.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2972 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-16 22:43:31 +00:00
Mark Cave-Ayland
8a8f2140d6
Add an example of how the liblwgeom API can be used by other C programs to manipulate geometries and output the result. Currently the unparser.c program shows how a geometry can be constructed "on the fly" and then exported in both WKT and HEXWKB formats; however it gives programmers the potential to devise some very unique processing tools which can generate files that can be loaded into PostGIS.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2971 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-16 22:29:54 +00:00
Mark Cave-Ayland
29f98cefc4
Move the LWGEOM-specific functions from lwgeom_sqlmm.c into liblwgeom/lwsegmentize.c to ensure that liblwgeom can exist as a standalone library.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2970 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-16 18:44:49 +00:00
Mark Cave-Ayland
742d9515ca
Allow a flags parameter to be passed into the WKT parser to determine which consistency checks are performed out of polygon ring closure, minimum number of points and odd number of points.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2949 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-09 21:10:46 +00:00
Mark Cave-Ayland
0f7eae6d0e
Commit generated versions of the new parser files for people who do not have flex or bison installed.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2948 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-08 20:17:29 +00:00
Mark Cave-Ayland
8437f89419
Enhance geometry parser so that it keeps track of the current position during parsing. With a bit more work, this should allow error messages to pinpoint the exact location of an invalid geometry section or syntax error.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2947 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-08 20:16:04 +00:00
Mark Cave-Ayland
b0641e9c1d
Yet another update to the liblwgeom parser API - lwgeom_from_ewkt() has been renamed to serialized_lwgeom_from_ewkt() to indicate that the function returns a serialied LWGEOM rather than an unserialized LWGEOM structure.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2945 b70326c6-7e19-0410-871a-916f4a2858ee
2008-09-07 11:02:05 +00:00
Mark Cave-Ayland
9a8647cfe6
Fix -o option for flex; the output filename must be specified immediately after -o without any preceding white space. Per report from Jorgen Austvik.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2884 b70326c6-7e19-0410-871a-916f4a2858ee
2008-07-28 09:13:45 +00:00
Mark Cave-Ayland
bdaf9c2271
Rename the new parser function ewkt_to_lwgeom() to lwgeon_from_ewkt() so that it matches the rest of the parser API
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2841 b70326c6-7e19-0410-871a-916f4a2858ee
2008-07-13 17:33:19 +00:00
Mark Cave-Ayland
49b827c8d6
Add some additional LWDEBUG(F) statements for debugging that I missed the first time around with the new debugging infrastructure
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2840 b70326c6-7e19-0410-871a-916f4a2858ee
2008-07-13 11:09:34 +00:00
Mark Cave-Ayland
4f8c4b5e8f
More work on improving the EWKT/B parser; remove all references to allocator functions from outside of liblwgeom by generating wrapper functions with more meaningful names. As well as cleaning up the API, it also makes the code much more readable
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2839 b70326c6-7e19-0410-871a-916f4a2858ee
2008-07-13 10:50:56 +00:00
Mark Cave-Ayland
94babd74af
Add the parser build rules back into the liblwgeom Makefile, so now any changes to either the lexer or parser source files will automatically invoke a rebuild of the relevant output files during make
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2820 b70326c6-7e19-0410-871a-916f4a2858ee
2008-07-03 09:28:38 +00:00
Mark Cave-Ayland
0e7e3e01d9
Fix liblwgeom requiring gcc to compile. By using macros and variables supplied by libtool, we can now detect the PIC flags and whether the compiler will accept additional gcc warning flags for developers
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2819 b70326c6-7e19-0410-871a-916f4a2858ee
2008-07-01 14:15:33 +00:00
Mark Cave-Ayland
ffde636dc0
Split the basic geometry accessors into a separate static library liblwgeom.a; this potentially allows re-use of the liblwgeom functions from within PostGIS, or could be extended at a later date to include databases other than MySQL. This patch includes a change to the liblwgeom handler functions; instead of sprinkling init_pg_func()s around the source, I have changed the default liblwgeom handlers to make use of a callback to allow linked libraries to set their own handlers the first time any of them are called. I have also tidied up the parser API a little in liblwgeom.h, which means wktparse.h can be removed from all of the headers in the lwgeom/ directory, plus renamed wktunparse.c to lwgunparse.c to keep things similar to lwgparse.c. Finally, I renamed liblwgeom.c to lwutil.c to avoid confusion within the new interface. TODO: the liblwgeom Makefile has some gcc-specific options, but these can be fixed later - it seemed more important to make the warnings visible to developers.
...
git-svn-id: http://svn.osgeo.org/postgis/trunk@2815 b70326c6-7e19-0410-871a-916f4a2858ee
2008-06-29 19:11:48 +00:00