Package org.geotools.referencing

Examples of org.geotools.referencing.NamedIdentifier


    private DefaultTemporalCoordinate temporalCoordinate1;
    private DefaultTemporalCoordinate temporalCoordinate2;

    @Before
    public void setUp() {
        NamedIdentifier name1 = new NamedIdentifier(Citations.CRS, "Coordinate1");
        NamedIdentifier name2 = new NamedIdentifier(Citations.CRS, "Coordinate2");
        Calendar cal = Calendar.getInstance();
        cal.set(2000, 1, 1);
        temporalCoordinateSystem1 = new DefaultTemporalCoordinateSystem(name1, null, cal.getTime(), new SimpleInternationalString("day"));
        temporalCoordinate1 = new DefaultTemporalCoordinate(temporalCoordinateSystem1, null, 50785.48);
        cal.set(1981, 6, 25);
View Full Code Here


    public static ReferenceIdentifier[] getIdentifiers(final String nameIdentifier) {
        if (nameIdentifier.equalsIgnoreCase("WGS84")) {
            final ReferenceIdentifier[] identifiers = {

            new NamedIdentifier(Citations.OGC, "WGS84"),
                    new NamedIdentifier(Citations.ORACLE, "WGS 84"),
                    new NamedIdentifier(null, "WGS_84"), new NamedIdentifier(null, "WGS 1984"),
                    new NamedIdentifier(Citations.EPSG, "WGS_1984"),
                    new NamedIdentifier(Citations.ESRI, "D_WGS_1984"),
                    new NamedIdentifier(Citations.EPSG, "World Geodetic System 1984") };
            return identifiers;
        }
        // TODO: Handle mores
        return null;
    }
View Full Code Here

            DefaultEngineeringDatum.UNKNOWN, DefaultCartesianCS.DISPLAY, true);
   
    static Map<String, ?> buildProperties(String name, Citation authority, String code) {
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(IdentifiedObject.NAME_KEY, name);
        props.put(IdentifiedObject.IDENTIFIERS_KEY, new NamedIdentifier(authority, code));
        return props;
    }
View Full Code Here

     */
    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {

        String frameName = ((URI) node.getAttributeValue("frame", "#ISO-8601")).toString();
        NamedIdentifier frameID = new NamedIdentifier(Citations.CRS, frameName);
        TemporalReferenceSystem frame = new DefaultTemporalReferenceSystem(frameID, null);

        Instant begining = new DefaultInstant((Position) node.getChild("BeginPosition").getValue());
        Instant ending = new DefaultInstant((Position) node.getChild("EndPosition").getValue());

View Full Code Here

            // EPSG
            if (crs != null) {
                Set<ReferenceIdentifier> ids = crs.getIdentifiers();
                // WKT defined crs might not have identifiers at all
                if(ids != null && ids.size() > 0) {
                    NamedIdentifier namedIdent = (NamedIdentifier) ids.iterator().next();
                    String csStr = namedIdent.getCodeSpace().toUpperCase();
   
                    if (csStr.equals("EPSG")) {
                        jsonWriter.key("crs");
                        jsonWriter.object();
                        jsonWriter.key("type").value(csStr);
                        jsonWriter.key("properties");
                        jsonWriter.object();
                        jsonWriter.key("code");
                        jsonWriter.value(namedIdent.getCode());
                        jsonWriter.endObject(); // end properties
                        jsonWriter.endObject(); // end crs
                    }
                }
            }
View Full Code Here

        // EPSG
        if (crs != null) {
            Set<ReferenceIdentifier> ids = crs.getIdentifiers();
            // WKT defined crs might not have identifiers at all
            if (ids != null && ids.size() > 0) {
                NamedIdentifier namedIdent = (NamedIdentifier) ids.iterator().next();
                String csStr = namedIdent.getCodeSpace().toUpperCase();

                if (csStr.equals("EPSG")) {
                    jsonWriter.key("crs");
                    jsonWriter.object();
                    jsonWriter.key("type").value(csStr);
                    jsonWriter.key("properties");
                    jsonWriter.object();
                    jsonWriter.key("code");
                    jsonWriter.value(namedIdent.getCode());
                    jsonWriter.endObject(); // end properties
                    jsonWriter.endObject(); // end crs
                }
            }
        }
View Full Code Here

     */
    public Object parse(ElementInstance instance, Node node, Object value)
            throws Exception {

        String frameName = ((URI) node.getAttributeValue("frame", "#ISO-8601")).toString();
        NamedIdentifier frameID = new NamedIdentifier(Citations.CRS, frameName);
        TemporalReferenceSystem frame = new DefaultTemporalReferenceSystem(frameID, null);

        Instant begining = new DefaultInstant((Position) node.getChild("BeginPosition").getValue());
        Instant ending = new DefaultInstant((Position) node.getChild("EndPosition").getValue());

View Full Code Here

TOP

Related Classes of org.geotools.referencing.NamedIdentifier

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.