Package org.opengis.feature.type

Examples of org.opengis.feature.type.GeometryType


          } else {
            objSR = new JSONObject();
            objSR.put("wkid", outSR);
            obj.put("spatialReference", objSR);

            GeometryType geometryType = featureCollection
                .getSchema().getGeometryDescriptor().getType();
            obj
                .put("geometryType", EsriJsonUtil
                    .geometryType2String(geometryType
                        .getBinding()));
            String geometryField = featureCollection.getSchema()
                .getGeometryDescriptor().getLocalName();

            ArrayList<String> fields = new ArrayList<String>();
View Full Code Here


            writeElement("minoccurs", Integer.toString(descriptor.getMinOccurs()));
            writeElement("maxoccurs", Integer.toString(descriptor.getMaxOccurs()));
            writeElement("nillable", Boolean.toString(descriptor.isNillable()));
            PropertyType attrType = descriptor.getType();
            if (attrType instanceof GeometryType) {
                GeometryType gt = (GeometryType) attrType;
                CoordinateReferenceSystem crs = gt.getCoordinateReferenceSystem();
                String crsText = CrsTextSerializer.serialize(crs);
                writeElement("crs", crsText);
            }
            out.writeEndElement();
        }
View Full Code Here

            Entry<PropertyDescriptor, AttributeDiff> entry = iter.next();
            out.writeStartElement("diff");
            PropertyType attrType = entry.getKey().getType();
            if (attrType instanceof GeometryType) {
                writeElement("geometry", "true");
                GeometryType gt = (GeometryType) attrType;
                CoordinateReferenceSystem crs = gt.getCoordinateReferenceSystem();
                if (crs != null) {
                    String crsCode = null;
                    try {
                        crsCode = CRS.lookupIdentifier(Citations.EPSG, crs, false);
                    } catch (FactoryException e) {
View Full Code Here

                                    .getDescriptors();

                            for (PropertyDescriptor attrib : attribs) {
                                PropertyType attrType = attrib.getType();
                                if (attrType instanceof GeometryType) {
                                    GeometryType gt = (GeometryType) attrType;
                                    CoordinateReferenceSystem crs = gt
                                            .getCoordinateReferenceSystem();
                                    if (crs != null) {
                                        try {
                                            crsCode = CRS.lookupIdentifier(Citations.EPSG, crs,
                                                    false);
View Full Code Here

                            Collection<PropertyDescriptor> attribs = type.type().getDescriptors();

                            for (PropertyDescriptor attrib : attribs) {
                                PropertyType attrType = attrib.getType();
                                if (attrType instanceof GeometryType) {
                                    GeometryType gt = (GeometryType) attrType;
                                    CoordinateReferenceSystem crs = gt
                                            .getCoordinateReferenceSystem();

                                    if (crs != null) {
                                        try {
                                            crsCode = CRS.lookupIdentifier(Citations.EPSG, crs,
View Full Code Here

                        String crsCode = null;

                        for (PropertyDescriptor attrib : attribs) {
                            PropertyType attrType = attrib.getType();
                            if (attrType instanceof GeometryType) {
                                GeometryType gt = (GeometryType) attrType;
                                CoordinateReferenceSystem crs = gt.getCoordinateReferenceSystem();
                                if (crs != null) {
                                    try {
                                        crsCode = CRS.lookupIdentifier(Citations.EPSG, crs, false);
                                    } catch (FactoryException e) {
                                        crsCode = null;
View Full Code Here

    private static void writePropertyType(PropertyType type, DataOutput data) throws IOException {
        writeName(type.getName(), data);
        data.writeByte(FieldType.forBinding(type.getBinding()).getTag());
        if (type instanceof GeometryType) {
            GeometryType gType = (GeometryType) type;
            CoordinateReferenceSystem crs = gType.getCoordinateReferenceSystem();
            String srsName;
            if (crs == null) {
                srsName = "urn:ogc:def:crs:EPSG::0";
            } else {
                final boolean longitudeFirst = CRS.getAxisOrder(crs, false) == AxisOrder.EAST_NORTH;
View Full Code Here

        private void writePropertyType(PropertyType type, DataOutput data) throws IOException {
            writeName(type.getName(), data);
            data.writeByte(FieldType.forBinding(type.getBinding()).getTag());
            if (type instanceof GeometryType) {
                GeometryType gType = (GeometryType) type;
                CoordinateReferenceSystem crs = gType.getCoordinateReferenceSystem();
                String srsName;
                if (crs == null) {
                    srsName = "urn:ogc:def:crs:EPSG::0";
                } else {
                    final boolean longitudeFirst = CRS.getAxisOrder(crs, false) == AxisOrder.EAST_NORTH;
View Full Code Here

                        PropertyDescriptor attrib = attribs.get(i);
                        ansi.a(attrib.getName()).newline();
                        PropertyType attrType = attrib.getType();
                        String typeName = FieldType.forBinding(attrType.getBinding()).name();
                        if (attrType instanceof GeometryType) {
                            GeometryType gt = (GeometryType) attrType;
                            CoordinateReferenceSystem crs = gt.getCoordinateReferenceSystem();
                            String crsText = CrsTextSerializer.serialize(crs);
                            ansi.a(typeName).a(" ").a(crsText).newline();
                        } else {
                            ansi.a(typeName).newline();
                        }
View Full Code Here

    @Override
    public GeometryAttribute createGeometryAttribute(Object value, GeometryDescriptor descriptor,
            String id, CoordinateReferenceSystem crs) {
        if (crs != null && !(crs.equals(descriptor.getCoordinateReferenceSystem()))) {
            // update CRS
            GeometryType origType = (GeometryType) descriptor.getType();
            GeometryType geomType = new GeometryTypeImpl(origType.getName(), origType.getBinding(),
                    crs, origType.isIdentified(), origType.isAbstract(),
                    origType.getRestrictions(), origType.getSuper(), origType.getDescription());
            geomType.getUserData().putAll(origType.getUserData());

            descriptor = new GeometryDescriptorImpl(geomType, descriptor.getName(), descriptor
                    .getMinOccurs(), descriptor.getMaxOccurs(), descriptor.isNillable(),
                    ((GeometryDescriptor) descriptor).getDefaultValue());
            descriptor.getUserData().putAll(descriptor.getUserData());
View Full Code Here

TOP

Related Classes of org.opengis.feature.type.GeometryType

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.