Tabnine Logo
GeometryAttributeImpl
Code IndexAdd Tabnine to your IDE (free)

How to use
GeometryAttributeImpl
in
org.geotools.feature

Best Java code snippets using org.geotools.feature.GeometryAttributeImpl (Showing top 20 results out of 315)

origin: geotools/geotools

public GeometryAttribute createGeometryAttribute(
    Object value, GeometryDescriptor descriptor, String id, CoordinateReferenceSystem crs) {
  return new GeometryAttributeImpl(value, descriptor, id == null ? null : ff.gmlObjectId(id));
}
origin: geotools/geotools

public String toString() {
  StringBuffer sb = new StringBuffer(getClass().getSimpleName()).append(":");
  sb.append(getDescriptor().getName().getLocalPart());
  CoordinateReferenceSystem crs = getDescriptor().getType().getCoordinateReferenceSystem();
  if (!getDescriptor()
          .getName()
          .getLocalPart()
          .equals(getDescriptor().getType().getName().getLocalPart())
      || id != null
      || crs != null) {
    sb.append("<");
    sb.append(getDescriptor().getType().getName().getLocalPart());
    if (id != null) {
      sb.append(" id=");
origin: geotools/geotools

/**
 * Returns the non null envelope of this attribute. If the attribute's geometry is <code>null
 * </code> the returned Envelope <code>isNull()</code> is true.
 *
 * @return
 */
public synchronized BoundingBox getBounds() {
  if (bounds == null) {
    ReferencedEnvelope bbox =
        new ReferencedEnvelope(getType().getCoordinateReferenceSystem());
    Geometry geom = (Geometry) getValue();
    if (geom != null) {
      bbox.expandToInclude(geom.getEnvelopeInternal());
    } else {
      bbox.setToNull();
    }
    bounds = bbox;
  }
  return bounds;
}
origin: org.geotools/gt-main

public void setValue(Object newValue) throws IllegalArgumentException,
    IllegalStateException {
  setValue( (Geometry) newValue );
}

origin: geotools/geotools

public Property getProperty(String name) {
  final Integer idx = index.get(name);
  if (idx == null) {
    return null;
  } else {
    int index = idx.intValue();
    AttributeDescriptor descriptor = featureType.getDescriptor(index);
    if (descriptor instanceof GeometryDescriptor) {
      return new GeometryAttributeImpl(
          values[index], (GeometryDescriptor) descriptor, null);
    } else {
      return new Attribute(index);
    }
  }
}
origin: org.geotools/gt-main

/**
 * Returns the non null envelope of this attribute. If the attribute's
 * geometry is <code>null</code> the returned Envelope
 * <code>isNull()</code> is true.
 * 
 * @return 
 */
public synchronized BoundingBox getBounds() {
  if( bounds == null ){
    ReferencedEnvelope bbox = new ReferencedEnvelope(getType().getCoordinateReferenceSystem());
    Geometry geom = (Geometry) getValue();
    if (geom != null) {
      bbox.expandToInclude(geom.getEnvelopeInternal());
    }
    else {
      bbox.setToNull();
    }
    bounds =  bbox;
  }
  return bounds;
}
origin: org.geotools/gt-main

    public String toString() {
      StringBuffer sb = new StringBuffer(getClass().getSimpleName()).append(":");
      sb.append(getDescriptor().getName().getLocalPart());
      CoordinateReferenceSystem crs = getDescriptor().getType().getCoordinateReferenceSystem();
      if(!getDescriptor().getName().getLocalPart().equals(getDescriptor().getType().getName().getLocalPart()) ||
          id != null || crs != null){
        sb.append("<");
        sb.append(getDescriptor().getType().getName().getLocalPart());
        if( id != null ){
          sb.append( " id=");
          sb.append( id );
        }
        if( crs != null ){
          sb.append( " crs=");
          sb.append( crs );
        }
        if( id != null ){
          sb.append( " id=");
          sb.append( id );
        }
        sb.append(">");
      }
      sb.append("=");
      sb.append(value);
      return sb.toString();
    }
}
origin: geotools/geotools

public GeometryAttribute getDefaultGeometryProperty() {
  GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor();
  GeometryAttribute geometryAttribute = null;
  if (geometryDescriptor != null) {
    Object defaultGeometry = getDefaultGeometry();
    geometryAttribute =
        new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null);
  }
  return geometryAttribute;
}
origin: geotools/geotools

@Override
public GeometryAttribute getDefaultGeometryProperty() {
  GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor();
  GeometryAttribute geometryAttribute = null;
  if (geometryDescriptor != null) {
    Object defaultGeometry = getDefaultGeometry();
    geometryAttribute =
        new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null);
  }
  return geometryAttribute;
}
origin: geotools/geotools

public GeometryAttribute getDefaultGeometryProperty() {
  GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor();
  GeometryAttribute geometryAttribute = null;
  if (geometryDescriptor != null) {
    Object defaultGeometry = getDefaultGeometry();
    geometryAttribute =
        new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null);
  }
  return geometryAttribute;
}
origin: geotools/geotools

public GeometryAttribute getDefaultGeometryProperty() {
  Object value = feature.getAttribute(backendGeomPropertyName);
  GeometryAttribute attr =
      new GeometryAttributeImpl(value, featureTyp.getGeometryDescriptor(), null);
  return attr;
}
origin: geotools/geotools

private Property createProperty(String name) {
  Object value =
      name.equals(geomPropertyName)
          ? feature.getAttribute(backendGeomPropertyName)
          : feature.getAttribute(name);
  AttributeDescriptor attrDescr = featureTyp.getDescriptor(name);
  if (attrDescr == null) return null;
  if (attrDescr instanceof GeometryDescriptor)
    return new GeometryAttributeImpl(value, (GeometryDescriptor) attrDescr, null);
  else return new AttributeImpl(value, attrDescr, null);
}
origin: geotools/geotools

if (pd instanceof GeometryDescriptor) {
  value.add(
      new GeometryAttributeImpl(
          ((AttributeDescriptor) pd).getDefaultValue(),
          (GeometryDescriptor) pd,
origin: geotools/geotools

  descriptor.getUserData().putAll(descriptor.getUserData());
return new GeometryAttributeImpl(value, descriptor, buildSafeGmlObjectId(id));
origin: geotools/geotools

        parentDescriptor.getDefaultValue());
GeometryAttributeImpl geom =
    new GeometryAttributeImpl(value, geomDescriptor, null);
ArrayList<Property> geomAtts = new ArrayList<Property>();
geomAtts.add(geom);
origin: org.geotools/gt-main

public GeometryAttribute createGeometryAttribute(
  Object value, GeometryDescriptor descriptor, String id, CoordinateReferenceSystem crs
) {

  return new GeometryAttributeImpl(value,descriptor, id == null? null : ff.gmlObjectId(id));
}

origin: org.geogit/geogit-core

@Override
public Property getProperty(String name) {
  final Integer revTypeIdx = nameToRevTypeIndex.get(name);
  if (revTypeIdx == null) {
    return null;
  } else {
    int index = typeToRevTypeIndex.inverse().get(revTypeIdx).intValue();
    AttributeDescriptor descriptor = featureType.getDescriptor(index);
    if (descriptor instanceof GeometryDescriptor) {
      return new GeometryAttributeImpl(revFeatureValues.get(revTypeIdx.intValue())
          .orNull(), (GeometryDescriptor) descriptor, null);
    } else {
      return new Attribute(index);
    }
  }
}
origin: org.geotools/gt-main

public Property getProperty(String name) {
  final Integer idx = index.get(name);
  if(idx == null){
    return null;
  } else {
    int index = idx.intValue();
    AttributeDescriptor descriptor = featureType.getDescriptor(index);
    if(descriptor instanceof GeometryDescriptor){
      return new GeometryAttributeImpl(values[index], (GeometryDescriptor) descriptor, null); 
    }else{
      return new Attribute( index );
    }
  }
}
origin: org.geotools/gt-main

public GeometryAttribute getDefaultGeometryProperty() {
  GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor();
  GeometryAttribute geometryAttribute = null;
  if(geometryDescriptor != null){
    Object defaultGeometry = getDefaultGeometry();
    geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null);            
  }
  return geometryAttribute;
}
origin: org.geogit/geogit-core

@Override
public GeometryAttribute getDefaultGeometryProperty() {
  GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor();
  GeometryAttribute geometryAttribute = null;
  if (geometryDescriptor != null) {
    Object defaultGeometry = getDefaultGeometry();
    geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null);
  }
  return geometryAttribute;
}
org.geotools.featureGeometryAttributeImpl

Javadoc

TODO: rename to GeometricAttribute Provides ...TODO summary sentence

TODO Description

Example Use:

 
GeometryAttributeType x = new GeometryAttributeType( ... ); 
TODO code example 

Most used methods

  • <init>
  • getDescriptor
  • getType
  • getValue
  • setValue

Popular in Java

  • Reactive rest calls using spring rest template
  • setContentView (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • findViewById (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now