Makes a simple geometry for Geodatabase.

@return Returns simplified geometry.

Note: isSimpleRelaxed should return true after this operation.
515755
public OGCGeometry makeSimpleRelaxed(boolean forceProcessing) {
		OperatorSimplify op = (OperatorSimplify) OperatorFactoryLocal
				.getInstance().getOperator(Operator.Type.Simplify);
		return OGCGeometry.createFromEsriGeometry(
				op.execute(getEsriGeometry(), esriSR, forceProcessing, null),
				esriSR);
	}
221982
protected GeometryEnvelope getEnvelope(GeoPackageGeometryData data) {
		GeometryEnvelope envelope = null;
		if (data != null) {
			envelope = data.getOrBuildEnvelope();
		}
		return envelope;
	}
627843
public static function getGeoDBO()
	{
		static $instance;

		if (!is_object($instance))
		{
			$geodb_params = \Component::params('com_system');

			$options = array();
			$options['driver']   = $geodb_params->get('geodb_driver', 'pdo');
			$options['host']     = $geodb_params->get('geodb_host', 'localhost');
			$options['port']     = $geodb_params->get('geodb_port', '');
			$options['user']     = $geodb_params->get('geodb_user', '');
			$options['password'] = $geodb_params->get('geodb_password', '');
			$options['database'] = $geodb_params->get('geodb_database', '');
			$options['prefix']   = $geodb_params->get('geodb_prefix', '');

			if (empty($options['database']) || empty($options['user']) || empty($options['password']))
			{
				return null;
			}

			try
			{
				$instance = \Hubzero\Database\Driver::getInstance($options);
			}
			catch (\Exception $e)
			{
				$instance = false;
			}
		}

		if (!$instance || ($instance instanceof Exception) || !$instance->getConnection())
		{
			return null;
		}

		return $instance;
	}
481012
public static List<Polygon> createSimpleDirectionArrow( Geometry... geometries ) {
        List<Polygon> polygons = new ArrayList<>();
        for( Geometry geometry : geometries ) {
            for( int i = 0; i < geometry.getNumGeometries(); i++ ) {
                Geometry geometryN = geometry.getGeometryN(i);
                if (geometryN instanceof LineString) {
                    LineString line = (LineString) geometryN;
                    polygons.addAll(makeArrows(line));
                } else if (geometryN instanceof Polygon) {
                    Polygon polygonGeom = (Polygon) geometryN;
                    LineString exteriorRing = polygonGeom.getExteriorRing();
                    polygons.addAll(makeArrows(exteriorRing));
                    int numInteriorRing = polygonGeom.getNumInteriorRing();
                    for( int j = 0; j < numInteriorRing; j++ ) {
                        LineString interiorRingN = polygonGeom.getInteriorRingN(j);
                        polygons.addAll(makeArrows(interiorRingN));
                    }
                }
            }
        }
        return polygons;
    }
7977
public GeometryColumns getGeometryColumns() {
		GeometryColumns result = null;
		if (geometryColumns.size() > 1) {
			// This shouldn't happen with the unique table name constraint on
			// geometry columns
			throw new GeoPackageException(
					"Unexpected state. More than one GeometryColumn has a foreign key to the Contents. Count: "
							+ geometryColumns.size());
		} else if (geometryColumns.size() == 1) {
			CloseableIterator<GeometryColumns> iterator = geometryColumns
					.closeableIterator();
			try {
				result = iterator.next();
			} finally {
				try {
					iterator.close();
				} catch (IOException e) {
					throw new GeoPackageException(
							"Failed to close the Geometry Columns iterator", e);
				}
			}
		}
		return result;
	}
434118
public synchronized GeoInterface getGeoInterface() {
        if (geoInterface == null) {
            geoInterface = new GeoInterface(apiKey, sharedSecret, transport);
        }
        return geoInterface;
    }
477356
public Geometry geomAt(int offset) throws IOException {

                // need to update position
                buffer.position(offset);

                // record header
                buffer.skip(8);

                // shape record is all little endian
                buffer.order(ByteOrder.LITTLE_ENDIAN);

                // read the type, handlers don't need it
                ShapeType recordType = ShapeType.forID(buffer.getInt());

                // this usually happens if the handler logic is bunk,
                // but bad files could exist as well...
                if (recordType != ShapeType.NULL && recordType != fileShapeType) {
                        throw new IllegalStateException("ShapeType changed illegally from "
                                + fileShapeType + " to " + recordType);
                }

                return handler.read(buffer, recordType);
        }
1022622
public FacesConfigMapEntryType<FacesConfigMapEntriesType<T>> getOrCreateMapEntry()
   {
      List<Node> nodeList = childNode.get("map-entry");
      if (nodeList != null &&  nodeList.size() > 0)
      {
         return new FacesConfigMapEntryTypeImpl<FacesConfigMapEntriesType<T>>(this, "map-entry", childNode, nodeList.get(0));
      }
      return createMapEntry();
   }
342439
public String getGeometryType() {
      String geometryType = null;
      if (getParameters().length > 0 && getParameters()[0] != null) {
         geometryType = getParameters()[0].toString();
      }
      return geometryType;
   }
185942
private SimpleFeature createFeature(
            final SimpleFeatureBuilder featureBuilder,
            final GeometryFactory geometryFactory,
            final GridParam layerData,
            final AxisDirection direction,
            final int numDimensions,
            final double spacing,
            final double x, final double y,
            final int i,
            final int ordinate) {
        // CSON: ParameterNumber

        featureBuilder.reset();
        final int numPoints = layerData.pointsInLine + 1; // add 1 for the last point
        final LinearCoordinateSequence coordinateSequence = new LinearCoordinateSequence().
                setDimension(numDimensions).
                setOrigin(x, y).
                setVariableAxis(ordinate).
                setNumPoints(numPoints).
                setSpacing(spacing).
                setOrdinate0AxisDirection(direction);
        LineString geom = geometryFactory.createLineString(coordinateSequence);
        featureBuilder.set(Grid.ATT_GEOM, geom);

        return featureBuilder.buildFeature("grid." + (ordinate == 1 ? 'x' : 'y') + "." + i);
    }
719655
public Shape convert2Spatial4j() {
        switch(getType()) {
            case POINT: return getPoint().getSpatial4jPoint();
            case CIRCLE: return CTX.makeCircle(getPoint(0).getSpatial4jPoint(), DistanceUtils.dist2Degrees(getRadius(), DistanceUtils.EARTH_MEAN_RADIUS_KM));
            case BOX: return CTX.makeRectangle(getPoint(0).getSpatial4jPoint(),getPoint(1).getSpatial4jPoint());
            case POLYGON: throw new UnsupportedOperationException("Not yet supported");
            default: throw new IllegalStateException("Unrecognized type: " + getType());
        }
    }
313241
public static Geometry polygonize(Geometry geometry) {
        if(geometry == null){
            return null;
        }
        Polygonizer polygonizer = new Polygonizer();
        polygonizer.add(geometry);
        Collection pols = polygonizer.getPolygons();
        if(pols.isEmpty()){
            return null;
        }
        return FACTORY.createMultiPolygon(GeometryFactory.toPolygonArray(pols));
    }
1325666
public OGCGeometry getGeometry(DeferredObject[] args) {
		if (isConstant) {
			if (constantGeometry == null) {
				constantGeometry = getGeometry(args[argIndex]);
			} 
			
			return constantGeometry;
		} else {
			// not constant, so we have to rebuild the geometry
			// on every call
			return getGeometry(args[argIndex]);
		}
	}
555246
public static GeometryCollection createDT(Geometry geometry, int flag) throws SQLException {
        if (geometry != null) {
            DelaunayTriangulationBuilder triangulationBuilder = new DelaunayTriangulationBuilder();
            triangulationBuilder.setSites(geometry);
            if(flag == 0) {
                return getTriangles(geometry.getFactory(), triangulationBuilder);
            } else {
                return (GeometryCollection)triangulationBuilder.getEdges(geometry.getFactory());
            }
        }
        return null;
    }
414762
def _get_geometry(self):
        
        return shapely.geometry.MultiPolygon([bbox.geometry for bbox in self.bbox_list])
694484
private GeoResult<?> buildGeoResult(final ArangoCursor<?> cursor) {
		GeoResult<?> geoResult = null;
		while (cursor.hasNext() && geoResult == null) {
			final Object object = cursor.next();
			if (!(object instanceof VPackSlice)) {
				continue;
			}

			final VPackSlice slice = (VPackSlice) object;
			final VPackSlice distSlice = slice.get("_distance");
			final Double distanceInMeters = distSlice.isDouble() ? distSlice.getAsDouble() : null;
			if (distanceInMeters == null) {
				continue;
			}

			final Object entity = operations.getConverter().read(domainClass, slice);
			final Distance distance = new Distance(distanceInMeters / 1000, Metrics.KILOMETERS);
			geoResult = new GeoResult<>(entity, distance);
		}
		return geoResult;
	}
1050615
function () {
        if (Utils.isNullOrEmpty(server.spaceGeometries) && !Utils.isNullOrEmpty(server.spaces)) {
            Object.keys(server.spaces).forEach(function (s) {
                const geometry = { w: Number.MIN_VALUE, h: Number.MIN_VALUE };
                server.spaces[s].forEach(function (e) {
                    geometry.w = Math.max(e.x + e.w, geometry.w);
                    geometry.h = Math.max(e.y + e.h, geometry.h);
                });
                log.debug('Successfully computed geometry for space:', s);
                server.spaceGeometries[s] = geometry;
            });
        }
        return server.spaceGeometries;
    }