Skip to content
Permalink
Browse files

Update reference lines

  • Loading branch information
nyalldawson committed Nov 9, 2018
1 parent 7641605 commit 63c9bcb5d28310b2e6b35efdc5bf52466aec0021
@@ -20,21 +20,21 @@
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.0">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>11.1414213562373,4.85857864376269 9.2,2.91715728752538 9.2,1.8 6.0,1.8</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6.0,1.8 9.2,1.8 9.2,2.91715728752538 11.1414213562373,4.85857864376269</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>1</ogr:instance>
<ogr:offset>-0.2</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.0">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>11.2828427124746,4.71715728752538 9.4,2.83431457505076 9.4,1.6 6.0,1.6</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6.0,1.6 9.4,1.6 9.4,2.83431457505076 11.2828427124746,4.71715728752538</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>2</ogr:instance>
<ogr:offset>-0.4</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.0">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>11.4242640687119,4.57573593128807 9.6,2.75147186257614 9.6,1.4 6.0,1.4</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6.0,1.4 9.6,1.4 9.6,2.75147186257614 11.4242640687119,4.57573593128807</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>3</ogr:instance>
<ogr:offset>-0.6</ogr:offset>
</ogr:create_parallel_lines>
@@ -48,21 +48,21 @@
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.1">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>1.0,-1.2 -1.0,-1.2</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>-1.0,-1.2 1.0,-1.2</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>1</ogr:instance>
<ogr:offset>-0.2</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.1">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>1.0,-1.4 -1.0,-1.4</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>-1.0,-1.4 1.0,-1.4</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>2</ogr:instance>
<ogr:offset>-0.4</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.1">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>1.0,-1.6 -1.0,-1.6</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>-1.0,-1.6 1.0,-1.6</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>3</ogr:instance>
<ogr:offset>-0.6</ogr:offset>
</ogr:create_parallel_lines>
@@ -76,21 +76,21 @@
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.2">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>3.2,3.0 3.2,1.8 2.8,1.8 2.2,1.8 2.2,0.0</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>2.2,0.0 2.2,1.8 2.8,1.8 3.2,1.8 3.2,3.0</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>1</ogr:instance>
<ogr:offset>-0.2</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.2">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>3.4,3.0 3.4,1.6 2.93333333333333,1.6 2.4,1.6 2.4,0.0</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>2.4,0.0 2.4,1.6 2.93333333333333,1.6 3.4,1.6 3.4,3.0</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>2</ogr:instance>
<ogr:offset>-0.4</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.2">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>3.6,3.0 3.6,1.4 3.06666666666667,1.4 2.6,1.4 2.6,0.0</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>2.6,0.0 2.6,1.4 3.06666666666667,1.4 3.6,1.4 3.6,3.0</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>3</ogr:instance>
<ogr:offset>-0.6</ogr:offset>
</ogr:create_parallel_lines>
@@ -104,21 +104,21 @@
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.3">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>5.0,0.8 3.0,0.8</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>3.0,0.8 5.0,0.8</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>1</ogr:instance>
<ogr:offset>-0.2</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.3">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>5.0,0.6 3.0,0.6</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>3.0,0.6 5.0,0.6</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>2</ogr:instance>
<ogr:offset>-0.4</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.3">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>5.0,0.4 3.0,0.4</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>3.0,0.4 5.0,0.4</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>3</ogr:instance>
<ogr:offset>-0.6</ogr:offset>
</ogr:create_parallel_lines>
@@ -132,21 +132,21 @@
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.4">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>10.0,-3.2 7.0,-3.2</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>7.0,-3.2 10.0,-3.2</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>1</ogr:instance>
<ogr:offset>-0.2</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.4">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>10.0,-3.4 7.0,-3.4</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>7.0,-3.4 10.0,-3.4</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>2</ogr:instance>
<ogr:offset>-0.4</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.4">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>10.0,-3.6 7.0,-3.6</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>7.0,-3.6 10.0,-3.6</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>3</ogr:instance>
<ogr:offset>-0.6</ogr:offset>
</ogr:create_parallel_lines>
@@ -160,21 +160,21 @@
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.5">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>10.1414213562373,0.858578643762691 6.14142135623731,-3.14142135623731</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6.14142135623731,-3.14142135623731 10.1414213562373,0.858578643762691</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>1</ogr:instance>
<ogr:offset>-0.2</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.5">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>10.2828427124746,0.717157287525381 6.28284271247462,-3.28284271247462</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6.28284271247462,-3.28284271247462 10.2828427124746,0.717157287525381</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>2</ogr:instance>
<ogr:offset>-0.4</ogr:offset>
</ogr:create_parallel_lines>
</gml:featureMember>
<gml:featureMember>
<ogr:create_parallel_lines fid="lines.5">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>10.4242640687119,0.575735931288071 6.42426406871193,-3.42426406871193</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6.42426406871193,-3.42426406871193 10.4242640687119,0.575735931288071</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:instance>3</ogr:instance>
<ogr:offset>-0.6</ogr:offset>
</ogr:create_parallel_lines>
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=""
xsi:schemaLocation="http://ogr.maptools.org/ line_offset_round_negative.xsd"
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
@@ -13,32 +13,32 @@

<gml:featureMember>
<ogr:line_offset_round_negative fid="lines.0">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>11.707106781186548,4.292893218813452 10.0,2.585786437626905 10,2 9.98078528040323,1.804909677983872 9.923879532511286,1.61731656763491 9.831469612302545,1.444429766980398 9.707106781186548,1.292893218813453 9.555570233019603,1.168530387697455 9.38268343236509,1.076120467488713 9.195090322016128,1.01921471959677 9,1 6,1</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6,1 9,1 9.19509032201613,1.01921471959677 9.38268343236509,1.07612046748871 9.5555702330196,1.16853038769745 9.70710678118655,1.29289321881345 9.83146961230254,1.4444297669804 9.92387953251129,1.61731656763491 9.98078528040323,1.80490967798387 10,2 10.0,2.5857864376269 11.7071067811865,4.29289321881345</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:line_offset_round_negative>
</gml:featureMember>
<gml:featureMember>
<ogr:line_offset_round_negative fid="lines.1">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>1,-2 -1,-2</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>-1,-2 1,-2</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:line_offset_round_negative>
</gml:featureMember>
<gml:featureMember>
<ogr:line_offset_round_negative fid="lines.2">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>4,3 4,2 3.98078528040323,1.804909677983872 3.923879532511287,1.61731656763491 3.831469612302545,1.444429766980398 3.707106781186547,1.292893218813453 3.555570233019602,1.168530387697455 3.38268343236509,1.076120467488713 3.356009692300209,1.068029076900628 3.195090322016128,1.01921471959677 3,1 3,0</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>3,0 3,1 3.19509032201613,1.01921471959677 3.35600969230021,1.06802907690063 3.38268343236509,1.07612046748871 3.5555702330196,1.16853038769745 3.70710678118655,1.29289321881345 3.83146961230255,1.4444297669804 3.92387953251129,1.61731656763491 3.98078528040323,1.80490967798387 4,2 4,3</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:line_offset_round_negative>
</gml:featureMember>
<gml:featureMember>
<ogr:line_offset_round_negative fid="lines.3">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>5,0 3,0</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>3,0 5,0</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:line_offset_round_negative>
</gml:featureMember>
<gml:featureMember>
<ogr:line_offset_round_negative fid="lines.4">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>10,-4 7,-4</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>7,-4 10,-4</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:line_offset_round_negative>
</gml:featureMember>
<gml:featureMember>
<ogr:line_offset_round_negative fid="lines.5">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>10.707106781186548,0.292893218813453 6.707106781186548,-3.707106781186547</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6.70710678118655,-3.70710678118655 10.7071067811865,0.292893218813453</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:line_offset_round_negative>
</gml:featureMember>
<gml:featureMember>
@@ -835,8 +835,8 @@ class TestQgsExpression: public QObject
QTest::newRow( "offset_curve not geom" ) << "offset_curve('g', 5)" << true << QVariant();
QTest::newRow( "offset_curve null" ) << "offset_curve(NULL, 5)" << false << QVariant();
QTest::newRow( "offset_curve point" ) << "offset_curve(geom_from_wkt('POINT(1 2)'),5)" << false << QVariant();
QTest::newRow( "offset_curve line" ) << "geom_to_wkt(offset_curve(geom_from_wkt('LineString(0 0, 10 0)'),1,segments:=4))" << false << QVariant( "LineString (0 1, 10 1)" );
QTest::newRow( "offset_curve line miter" ) << "geom_to_wkt(offset_curve(geometry:=geom_from_wkt('LineString(0 0, 10 0)'),distance:=-1,join:=2,miter_limit:=1))" << false << QVariant( "LineString (10 -1, 0 -1)" );
QTest::newRow( "offset_curve line" ) << "geom_to_wkt(offset_curve(geom_from_wkt('LineString(0 0, 10 0)'),1,segments:=4))" << false << QVariant( "LineString (10 1, 0 1)" );
QTest::newRow( "offset_curve line miter" ) << "geom_to_wkt(offset_curve(geometry:=geom_from_wkt('LineString(0 0, 10 0)'),distance:=-1,join:=2,miter_limit:=1))" << false << QVariant( "LineString (0 -1, 10 -1)" );
QTest::newRow( "offset_curve line bevel" ) << "geom_to_wkt(offset_curve(geometry:=geom_from_wkt('LineString(0 0, 10 0, 10 10)'),distance:=1,join:=3))" << false << QVariant( "LineString (0 1, 9 1, 9 10)" );
QTest::newRow( "wedge_buffer not geom" ) << "wedge_buffer('g', 0, 45, 1)" << true << QVariant();
QTest::newRow( "wedge_buffer null" ) << "wedge_buffer(NULL, 0, 45, 1)" << false << QVariant();

0 comments on commit 63c9bcb

Please sign in to comment.
You can’t perform that action at this time.