Search in sources :

Example 1 with CoordinateXYZM

use of org.locationtech.jts.geom.CoordinateXYZM in project jena by apache.

the class GMLReaderTest method testGetDimensionInfo4.

/**
 * Test of getDimensionInfo method, of class GMLReader. GML standards don't
 * seem to define a separate spatial dimension, i.e. no distinct M
 * dimension.<br>
 * 07-036, page 310 states "srsDimension is the dimension of the coordinate
 * reference system as stated in the coordinate reference system
 * definition."<br>
 * 10-100r3, page 22 states "c) coordinate reference systems may have 1, 2
 * or 3 dimensions".
 */
/*
    @Test
    @Ignore
    public void testGetDimensionInfo3b() {

        GMLReader instance = new GMLReader(GEOMETRY_FACTORY.createPoint(new CoordinateXYM(11.0, 12.0, 13.0)), 3);
        DimensionInfo expResult = new DimensionInfo(3, 2, 0);
        DimensionInfo result = instance.getDimensionInfo();

        //
        //
        assertEquals(expResult, result);
    }
     */
/**
 * Test of getDimensionInfo method, of class GMLReader.
 */
@Test
public void testGetDimensionInfo4() {
    GMLReader instance = new GMLReader(GEOMETRY_FACTORY.createPoint(new CoordinateXYZM(11.0, 12.0, 13.0, 14.0)), 4);
    DimensionInfo expResult = new DimensionInfo(4, 3, 0);
    DimensionInfo result = instance.getDimensionInfo();
    // 
    // 
    assertEquals(expResult, result);
}
Also used : CoordinateXYZM(org.locationtech.jts.geom.CoordinateXYZM) DimensionInfo(org.apache.jena.geosparql.implementation.DimensionInfo) Test(org.junit.Test)

Example 2 with CoordinateXYZM

use of org.locationtech.jts.geom.CoordinateXYZM in project jena by apache.

the class GMLReaderTest method testExtractPoint4.

/**
 * Test of extract method, of class GMLReader.
 *
 * @throws org.jdom2.JDOMException
 * @throws java.io.IOException
 */
/*
    @Test
    @Ignore
    public void testExtractPoint3b() throws JDOMException, IOException {


        String gmlText = "<gml:Point xmlns:gml=\"http://www.opengis.net/ont/gml\" srsName=\"http://www.opengis.net/def/crs/EPSG/0/27700\"><gml:pos>11.0 12.0 5.0</gml:pos></gml:Point>";
        GMLReader expResult = new GMLReader(GEOMETRY_FACTORY.createPoint(new CoordinateXYM(11.0, 12.0, 5.0)), 2, SRS_URI.OSGB36_CRS);
        GMLReader result = GMLReader.extract(gmlText);

        //
        //
        assertEquals(expResult, result);
    }
     */
/**
 * Test of extract method, of class GMLReader.
 *
 * @throws org.jdom2.JDOMException
 * @throws java.io.IOException
 */
@Test
public void testExtractPoint4() throws JDOMException, IOException {
    String gmlText = "<gml:Point xmlns:gml=\"http://www.opengis.net/ont/gml\" srsName=\"http://www.opengis.net/def/crs/EPSG/0/27700\"><gml:pos>11.0 12.0 8.0 5.0</gml:pos></gml:Point>";
    GMLReader expResult = new GMLReader(GEOMETRY_FACTORY.createPoint(new CoordinateXYZM(11.0, 12.0, 8.0, 5.0)), 2, SRS_URI.OSGB36_CRS);
    GMLReader result = GMLReader.extract(gmlText);
    // 
    // 
    assertEquals(expResult, result);
}
Also used : CoordinateXYZM(org.locationtech.jts.geom.CoordinateXYZM) LineString(org.locationtech.jts.geom.LineString) Test(org.junit.Test)

Example 3 with CoordinateXYZM

use of org.locationtech.jts.geom.CoordinateXYZM in project jena by apache.

the class CoordinateSequenceDimensionsTest method testFind_xyzm.

/**
 * Test of find method, of class CoordinateSequenceDimensions.
 */
@Test
public void testFind_xyzm() {
    Coordinate coordinate = new CoordinateXYZM(1.0, 2.0, 3.0, 4.0);
    CoordinateSequenceDimensions expResult = CoordinateSequenceDimensions.XYZM;
    CoordinateSequenceDimensions result = CoordinateSequenceDimensions.find(coordinate);
    assertEquals(expResult, result);
}
Also used : Coordinate(org.locationtech.jts.geom.Coordinate) CoordinateXYZM(org.locationtech.jts.geom.CoordinateXYZM) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)3 CoordinateXYZM (org.locationtech.jts.geom.CoordinateXYZM)3 DimensionInfo (org.apache.jena.geosparql.implementation.DimensionInfo)1 Coordinate (org.locationtech.jts.geom.Coordinate)1 LineString (org.locationtech.jts.geom.LineString)1