com.mysema.query.sql.spatial.SQLServerGeometryWriter Maven / Gradle / Ivy
/*
* Copyright 2014, Mysema Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.mysema.query.sql.spatial;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.List;
import org.geolatte.geom.Geometry;
import org.geolatte.geom.GeometryCollection;
import org.geolatte.geom.LineString;
import org.geolatte.geom.MultiLineString;
import org.geolatte.geom.MultiPoint;
import org.geolatte.geom.MultiPolygon;
import org.geolatte.geom.Point;
import org.geolatte.geom.PolyHedralSurface;
import org.geolatte.geom.Polygon;
import com.google.common.collect.Lists;
/**
* @author tiwe
*
*/
public class SQLServerGeometryWriter {
private static final int POINT = 1;
private static final int LINE_STRING = 2;
private static final int POLYGON = 3;
private static final int MULTI_POINT = 4;
private static final int MULTI_LINESTRING = 5;
private static final int MULTI_POLYGON = 6;
private static final int GEOMETRY_COLLECTION = 7;
private static class Figure {
int attributes;
int pointOffset;
}
private static class Shape {
int parentOffset;
int figureOffset;
int type;
}
private List points = Lists.newArrayList();
private List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy