Skip to content

Commit

Permalink
Resolved issue GEOT-5021;
Browse files Browse the repository at this point in the history
In readGeometryTaggedText in WKTReader2, made case for "POINT" case insensitive;
Added a simple test case for case insensitivity in WKTReader2Test;
  • Loading branch information
Dortund committed Feb 28, 2015
1 parent 1077e07 commit 3a307ff
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Expand Up @@ -397,7 +397,7 @@ private Geometry readGeometryTaggedText() throws IOException, ParseException {
return null;
}

if (type.equals("POINT")) {
if (type.equalsIgnoreCase("POINT")) {
return readPointText();
} else if (type.equalsIgnoreCase("LINESTRING")) {
return readLineStringText();
Expand Down
Expand Up @@ -187,4 +187,14 @@ public void testParseMulticurve() throws Exception {
assertTrue(ml.getGeometryN(0).getClass() == LineString.class);
assertTrue(ml.getGeometryN(1) instanceof CompoundRing);
}

@Test
public void testCaseInsensitive() throws Exception {
WKTReader reader = new WKTReader2();
assertNotNull( reader.read("POINT(1 2)") );
assertNotNull( reader.read("Point(1 2)") );

assertNotNull( reader.read("LINESTRING(0 2, 2 0, 8 6)") );
assertNotNull( reader.read("LineString(0 2, 2 0, 8 6)") );
}
}

0 comments on commit 3a307ff

Please sign in to comment.