Strabon
changeset 1520:38b0c0a12614
Fixed bug #73. Also relevant test in the test suite has been modified accordingly
since it was consistent with this bug.
since it was consistent with this bug.
author | Giannis Vlachopoulos <johnvl@di.uoa.gr> |
---|---|
date | Thu May 14 11:24:32 2015 +0300 (2015-05-14) |
parents | 9298aa0b7856 |
children | 6521e8989dc9 |
files | ChangeLog postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java testsuite/src/test/resources/stSPARQL/SpatialAnalysisFunctionsTest/BufferWithConstantTest.srx |
line diff
1.1 --- a/ChangeLog Wed Mar 18 14:03:01 2015 +0200 1.2 +++ b/ChangeLog Thu May 14 11:24:32 2015 +0300 1.3 @@ -1,5 +1,9 @@ 1.4 Wed Mar 11 21:02:48 2015 Pyravlos Team 1.5 1.6 + * Bug #73, modified appendBuffer function to take the srid into 1.7 + consideration even if the argument is a constant (wktLiteral 1.8 + or strdf literal) 1.9 + 1.10 * Update jar references on scripts used by the debian packaging. 1.11 Previously these references pointed only (incorrectly) to 1.12 SNAPSHOTs.
2.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java Wed Mar 18 14:03:01 2015 +0200 2.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java Thu May 14 11:24:32 2015 +0300 2.3 @@ -1872,7 +1872,7 @@ 2.4 filter.closeBracket(); 2.5 } 2.6 2.7 - //Buffer function 2.8 + //Buffer function (Giannis: dont get deceived by "filter". It also applies for the case the buffer occurs in the select clause too) 2.9 protected void appendBuffer(TripleGeneralDBOperator expr, GeneralDBSqlExprBuilder filter, SpatialFunctionsPostGIS func) throws UnsupportedRdbmsOperatorException 2.10 { 2.11 boolean sridNeeded = true; 2.12 @@ -1941,7 +1941,7 @@ 2.13 } 2.14 else if (tmp instanceof GeneralDBStringValue) //Constant!! 2.15 { 2.16 - sridNeeded = false; 2.17 + sridNeeded = true; 2.18 sridExpr = String.valueOf(WKTHelper.getSRID(((GeneralDBStringValue) tmp).getValue())); 2.19 break; 2.20 }
3.1 --- a/testsuite/src/test/resources/stSPARQL/SpatialAnalysisFunctionsTest/BufferWithConstantTest.srx Wed Mar 18 14:03:01 2015 +0200 3.2 +++ b/testsuite/src/test/resources/stSPARQL/SpatialAnalysisFunctionsTest/BufferWithConstantTest.srx Thu May 14 11:24:32 2015 +0300 3.3 @@ -6,7 +6,7 @@ 3.4 <results> 3.5 <result> 3.6 <binding name='buffer'> 3.7 - <literal datatype='http://strdf.di.uoa.gr/ontology#WKT'>POLYGON ((18.51248908676886 0.0022304072306898, 18.512489086768802 0.0022394268391313, 18.531703805007 0.1973297483274672, 18.5886095513394 0.3849228584614706, 18.681019469862246 0.5578096592705463, 18.80538229925464 0.7093462080002653, 18.956918845758608 0.8337090401047385, 19.129805644913805 0.9261189617217735, 19.317398754029355 0.983024711411565, 19.512489075173807 1.0022394331413353, 19.51249803440009 1.0022394331414393, 19.7075883572879 0.9830247156776696, 19.89518146887027 0.9261189695835728, 20.0680682710241 0.833709050783125, 20.219604820854016 0.7093462206556026, 20.343967653693618 0.5578096730514313, 20.436377575588256 0.3849228725514822, 20.493283325039744 0.1973297619875636, 20.512498045995084 0.002239439443644, 20.51249804599514 0.0022304198350916, 20.493283327453618 -0.1928599031781553, 20.436377580234563 -0.3804530146601173, 20.34396766031032 -0.5533398164745945, 20.21960482911171 -0.7048763657236403, 20.06806828054155 -0.8292391977494786, 19.895181479231532 -0.9216491186174952, 19.707588368060215 -0.9785548668606079, 19.512498045151858 -0.9977695864671131, 19.512489085925576 -0.9977695864671056, 19.317398764801673 -0.9785548668800716, 19.12980565527507 -0.9216491193392968, 18.956918855276065 -0.8292391997898305, 18.805382307512332 -0.7048763695836736, 18.681019476478948 -0.5533398224988286, 18.588609555985705 -0.3804530230042807, 18.531703807420875 -0.1928599137883199, 18.51248908676886 0.0022304072306898));http://www.opengis.net/def/crs/EPSG/0/2100</literal> 3.8 + <literal datatype='http://strdf.di.uoa.gr/ontology#WKT'>POLYGON ((-111699.52621351427 0.005688101702437, -111699.52621351369 1.0072227565753598, -109548.05371968949 21663.07894035089, -103177.26815752243 42488.64666773878, -92834.65151931695 61674.09877429663, -78921.47789677524 78480.19101539368, -61976.62825599895 92260.76607374407, -42655.07913255412 102487.5654796481, -21702.06885195989 108770.20628473054, 75.93636650929693 110870.6459331801, 76.93621333519695 110870.64456365933, 21843.307355598197 108711.70631747066, 42763.184566801065 102379.46736776605, 62035.14038828469 92119.5188906428, 78921.48117425787 78327.2927247086, 92776.13555651536 61532.82653947292, 103069.1338115732 42380.51312016071, 109406.76119514595 21604.553904167882, 111546.58914580086 1.0058440464288212, 111546.58914580313 0.0070681672776757, 109406.76128921594 -21603.538101944774, 103069.13397595414 -42379.48903809927, 92776.13575692166 -61531.7900471042, 78921.48137102922 -78326.24157852355, 62035.14054274524 -92118.45307486111, 42763.18464769027 -102378.3890965244, 21843.30734426086 -108710.61969803026, 76.93610651465133 -110869.55497162463, 75.93625968572451 -110869.55634114263, -21702.06899164256 -108769.11955591492, -42655.07928695646 -102486.48702223192, -61976.62840535829 -92259.70003516495, -78921.47802427062 -78479.13965042801, -92834.6516142562 -61673.062100869174, -103177.26821643289 -42487.622463514286, -109548.05374545977 -21662.063081215245, -111699.52621351427 0.005688101702437));http://www.opengis.net/def/crs/EPSG/0/2100</literal> 3.9 </binding> 3.10 </result> 3.11 </results>