Interface ElementExporter<E>
-
- Type Parameters:
E
- is the type of element to write inside the ESRI shape file.
public interface ElementExporter<E>
This interface describes functions which are used by aShapeFileWriter
to export elements inside an ESRI shape file.For an
ElementExporter
that exports GIS map elements, you should directly use aGISShapeFileWriter
, which embeds the element exporter.- Since:
- 14.0
- Version:
- 17.0 2020-01-04 14:41:52
- Author:
- Stéphane GALLAND, Olivier LAMOTTE
- Maven Group Id:
- org.arakhne.afc.advanced
- Maven Artifact Id:
- shapefile
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description AttributeProvider
getAttributeProvider(E element)
Replies the attribute container of the given element.AttributeProvider[]
getAttributeProviders(Collection<? extends E> elements)
Replies all the attribute containers of the given elements.ESRIBounds
getFileBounds()
Invoked to retrieve the bounds of the world.int
getGroupCountFor(E element)
Replies the count of groups of points.ShapeMultiPatchType
getGroupTypeFor(E element, int groupIndex)
Replies the type of the given part for a multipatch element.ESRIPoint
getPointAt(E element, int groupIndex, int pointIndex, boolean expectM, boolean expectZ)
Replies the point inside the given part at the given index.int
getPointCountFor(E element, int groupIndex)
Replies the count of points inside the given part.
-
-
-
Method Detail
-
getAttributeProviders
@Pure AttributeProvider[] getAttributeProviders(Collection<? extends E> elements) throws IOException
Replies all the attribute containers of the given elements. The attributes will be put in a DBase file header as columns.- Parameters:
elements
- are the element from which the attribute containers must be extracted- Returns:
- the attribute containers
- Throws:
IOException
- in case of error.
-
getAttributeProvider
@Pure AttributeProvider getAttributeProvider(E element) throws IOException
Replies the attribute container of the given element. The attributes will be put in a DBase file.- Parameters:
element
- is the element from which the attribute container must be extracted- Returns:
- the attribute container
- Throws:
IOException
- in case of error.
-
getFileBounds
@Pure ESRIBounds getFileBounds()
Invoked to retrieve the bounds of the world.- Returns:
- the bounds.
-
getPointCountFor
@Pure int getPointCountFor(E element, int groupIndex) throws IOException
Replies the count of points inside the given part. This function is also invoked for a multipoint. In this case, the group index is always equal to zero.- Parameters:
element
- is the element from which the point count must be extractedgroupIndex
- is the index of the group from which the point count must be replied.- Returns:
- the count of points in the part at the given index.
- Throws:
IOException
- in case of error.
-
getGroupCountFor
@Pure int getGroupCountFor(E element) throws IOException
Replies the count of groups of points.- Parameters:
element
- is the element from which the group count must be extracted- Returns:
- the count of groups of points.
- Throws:
IOException
- in case of error.
-
getPointAt
@Pure ESRIPoint getPointAt(E element, int groupIndex, int pointIndex, boolean expectM, boolean expectZ) throws IOException
Replies the point inside the given part at the given index.This function is also invoked for a simple point. In this case, the group and point indexes are both equal to zero. This function is also invoked for a multipoint. In this case, the group index is always equal to zero.
- Parameters:
element
- is the element from which the point must be extractedgroupIndex
- is the index of the group from which the point must be extracted.pointIndex
- is the index of the point in the group.expectM
- indicates if the M value is expected.expectZ
- indicates if the Z value is expected.- Returns:
- the point.
- Throws:
IOException
- in case of error.
-
getGroupTypeFor
@Pure ShapeMultiPatchType getGroupTypeFor(E element, int groupIndex) throws IOException
Replies the type of the given part for a multipatch element.A MultiPatch consists of a number of surface patches. Each surface patch describes a surface. The surface patches of a MultiPatch are referred to as its parts, and the type of part controls how the order of vertices of an MultiPatch part is interpreted.
A single Triangle Strip, or Triangle Fan, represents a single surface patch.
A sequence of parts that are rings can describe a polygon surface patch with holes. The sequence typically consists of an Outer Ring, representing the outer boundary of the patch, followed by a number of Inner Rings representing holes. When the individual types of rings in a collection of rings representing a polygon patch with holes are unknown, the sequence must start with First Ring, followed by a number of Rings. A sequence of Rings not preceded by an First Ring is treated as a sequence of Outer Rings without holes.
- Parameters:
element
- is the element from which the point count must be extractedgroupIndex
- is the index of the group from which the point count must be replied.- Returns:
- the type of the part.
- Throws:
IOException
- in case of error.
-
-