├── examples
├── config
│ └── config.json
├── output
│ └── .gitignore
├── datasets
│ ├── metadata_injection
│ │ ├── test.cpg
│ │ ├── test.shp
│ │ ├── test.shx
│ │ ├── test.prj
│ │ ├── test.qpj
│ │ ├── test.dbf
│ │ └── test.geojson
│ ├── velo_tour_2013
│ │ ├── velo_tour_2013.cpg
│ │ ├── velo_tour_2013.dbf
│ │ ├── velo_tour_2013.shp
│ │ ├── velo_tour_2013.shx
│ │ ├── velo_tour_2013.prj
│ │ └── velo_tour_2013.qmd
│ └── test-types.geojson
├── pipelines-and-workflows
│ ├── shp2oracle.png
│ ├── shp2geojson.png
│ ├── shp2postgis.png
│ ├── geojson2shp-types.png
│ └── A000-MI-metadata-injection-test.png
├── project-config.json
└── metadata
│ ├── pipeline-run-configuration
│ └── local.json
│ └── rdbms
│ ├── hop-gis-plugins-tests.json
│ └── hop-oracle-spatial.json
├── .github
├── ISSUE_TEMPLATE
│ ├── config.yml
│ ├── question.md
│ ├── bug_report.md
│ └── feature_request.md
├── stale.yml
├── workflows
│ └── verify.yml
└── pull_request_template.md
├── dxf
├── .gitignore
└── src
│ └── main
│ └── java
│ ├── org
│ └── kabeja
│ │ ├── xml
│ │ ├── ConsoleSerializer.java
│ │ ├── AbstractSAXSerializer.java
│ │ ├── SAXFilter.java
│ │ ├── AbstractSAXFilter.java
│ │ ├── SAXGenerator.java
│ │ ├── SAXSerializer.java
│ │ └── AbstractSAXGenerator.java
│ │ ├── dxf
│ │ ├── DXFXLine.java
│ │ ├── DXFExtendedData.java
│ │ ├── helpers
│ │ │ ├── HatchPattern.java
│ │ │ ├── DXFMLineStyleElementDistanceComparator.java
│ │ │ ├── Vector.java
│ │ │ ├── DXFMLineSegmentElement.java
│ │ │ ├── Edge.java
│ │ │ ├── DXFMLineSegment.java
│ │ │ └── SplinePoint.java
│ │ ├── DXF3DFace.java
│ │ ├── DXFBody.java
│ │ ├── DXFTrace.java
│ │ ├── DXFAttrib.java
│ │ ├── DXF3DSolid.java
│ │ ├── DXFLWPolyline.java
│ │ ├── objects
│ │ │ ├── DXFMLineStyleElement.java
│ │ │ ├── DXFImageDefObject.java
│ │ │ └── DXFObject.java
│ │ ├── DXFRegion.java
│ │ ├── DXFVariable.java
│ │ ├── DXFHeader.java
│ │ └── DXFLine.java
│ │ ├── processing
│ │ ├── AbstractPostProcessor.java
│ │ ├── event
│ │ │ ├── ProcessingEvent.java
│ │ │ └── ProcessingListener.java
│ │ ├── ProcessorException.java
│ │ ├── AbstractConfigurable.java
│ │ ├── Configurable.java
│ │ ├── PostProcessor.java
│ │ ├── PostProcessorConfig.java
│ │ ├── PostProcessManager.java
│ │ └── ImageFilter.java
│ │ ├── parser
│ │ ├── header
│ │ │ └── HeaderModes.java
│ │ ├── HandlerManager.java
│ │ ├── dxf
│ │ │ ├── DXFHandler.java
│ │ │ └── filter
│ │ │ │ ├── AbstractDXFStreamFilter.java
│ │ │ │ ├── DXFStreamFilter.java
│ │ │ │ └── FilterExample.java
│ │ ├── Handler.java
│ │ ├── ParseException.java
│ │ ├── AbstractSectionHandler.java
│ │ ├── objects
│ │ │ └── DXFObjectHandler.java
│ │ ├── table
│ │ │ ├── DXFTableHandler.java
│ │ │ └── AbstractTableHandler.java
│ │ ├── entities
│ │ │ ├── DXFTraceHandler.java
│ │ │ ├── DXF3DFaceHandler.java
│ │ │ ├── DXFXLineHandler.java
│ │ │ ├── DXFBodyHandler.java
│ │ │ ├── DXF3DSolidHandler.java
│ │ │ └── DXFAttribHandler.java
│ │ └── DXFSectionHandler.java
│ │ ├── ui
│ │ ├── Component.java
│ │ ├── UIException.java
│ │ ├── Startable.java
│ │ ├── PropertiesListener.java
│ │ ├── event
│ │ │ ├── DXFDocumentChangeListener.java
│ │ │ └── DXFDocumentChangeEventProvider.java
│ │ ├── Serviceable.java
│ │ ├── Application.java
│ │ ├── ApplicationToolBar.java
│ │ ├── ServiceManager.java
│ │ ├── ProcessingUIComponent.java
│ │ ├── ViewComponent.java
│ │ ├── model
│ │ │ ├── PipelineTreeNode.java
│ │ │ ├── SAXSerializerTreeNode.java
│ │ │ ├── SAXFilterTreeNode.java
│ │ │ ├── PostProcessorTreeNode.java
│ │ │ ├── ParserTreeNode.java
│ │ │ ├── ParsersTreeNode.java
│ │ │ ├── SAXFiltersTreeNode.java
│ │ │ ├── PropertyTreeNode.java
│ │ │ ├── PipelinesTreeNode.java
│ │ │ ├── PropertiesTreeNode.java
│ │ │ ├── PostProcessorsTreeNode.java
│ │ │ ├── SAXGeneratorsTreeNode.java
│ │ │ ├── SAXSerializersTreeNode.java
│ │ │ └── SAXGeneratorTreeNode.java
│ │ ├── PropertiesEditor.java
│ │ ├── DXFDocumentViewComponent.java
│ │ └── ApplicationMenuBar.java
│ │ ├── math
│ │ └── NURBSAutoStepPointIterator.java
│ │ ├── tools
│ │ ├── SAXSerializerConfig.java
│ │ └── SAXFilterConfig.java
│ │ └── io
│ │ └── StreamGenerator.java
│ ├── com
│ └── atolcd
│ │ └── gis
│ │ └── dxf
│ │ ├── Layer.java
│ │ ├── ExtendedData.java
│ │ └── Entity.java
│ └── fr
│ └── michaelm
│ └── jump
│ └── drivers
│ └── dxf
│ └── DxfXDATA.java
├── shp
├── .gitignore
└── src
│ └── main
│ └── java
│ └── org
│ └── geotools
│ ├── dbffile
│ ├── DbfFileException.java
│ └── DbfConsts.java
│ └── shapefile
│ ├── ShapefileException.java
│ ├── InvalidShapefileException.java
│ ├── ShapeTypeNotSupportedException.java
│ └── ShapeHandler.java
├── geojson
├── .gitignore
└── src
│ └── main
│ └── java
│ └── org
│ └── wololo
│ └── geojson
│ ├── Geometry.java
│ ├── Point.java
│ ├── Polygon.java
│ ├── LineString.java
│ ├── MultiPoint.java
│ ├── MultiLineString.java
│ ├── MultiPolygon.java
│ ├── Crs.java
│ ├── FeatureCollection.java
│ ├── Feature.java
│ └── GeoJSON.java
├── gpx
├── .gitignore
└── src
│ └── main
│ └── java
│ └── com
│ └── atolcd
│ └── gis
│ └── gpx
│ ├── IElement.java
│ ├── ISpatialElement.java
│ └── type
│ ├── AbstractElement.java
│ ├── Metadata.java
│ ├── TrackSegment.java
│ ├── AbstractSpatialElement.java
│ └── Author.java
├── mifmid
└── .gitignore
├── svg
├── .gitignore
└── src
│ └── main
│ └── java
│ └── com
│ └── atolcd
│ └── gis
│ └── svg
│ └── type
│ ├── container
│ ├── Defs.java
│ ├── Group.java
│ └── Link.java
│ ├── AbstractGraphic.java
│ ├── graphic
│ ├── Path.java
│ ├── Circle.java
│ ├── Text.java
│ ├── Rectangle.java
│ └── Image.java
│ ├── style
│ ├── ExternalStyle.java
│ └── EmbeddedStyle.java
│ ├── AbstractStyle.java
│ ├── IElement.java
│ ├── AbstractContainer.java
│ ├── Document.java
│ └── AbstractElement.java
├── concave-hull
└── .gitignore
├── spatialite
├── .gitignore
└── src
│ └── main
│ ├── resources
│ └── templates
│ │ └── spatialite_v4
│ └── java
│ ├── com
│ └── atolcd
│ │ └── gis
│ │ └── spatialite
│ │ └── Row.java
│ └── org
│ └── sqlite
│ └── spatialite
│ └── io
│ └── ByteOrderDataOutputStream.java
├── items-in-hop-gui.png
├── .gitignore
├── assemblies
└── src
│ └── main
│ └── resources
│ └── version.xml
├── hop-gis-plugins
└── src
│ └── main
│ ├── resources
│ ├── GisGroupBy.png
│ ├── GisRelate.png
│ ├── GisFileInput.png
│ ├── GisFileOutput.png
│ ├── GisGeometryInfo.png
│ ├── GisGeoprocessing.png
│ └── GisCoordinateTransformation.png
│ └── java
│ └── com
│ └── atolcd
│ └── hop
│ ├── core
│ └── row
│ │ └── value
│ │ └── GeometryInterface.java
│ ├── pipeline
│ └── transforms
│ │ ├── gisrelate
│ │ └── GisRelateData.java
│ │ ├── gisfileinput
│ │ ├── GisFileInputData.java
│ │ └── GisInputFormatParameter.java
│ │ ├── gisgeometryinfo
│ │ └── GisGeometryInfoData.java
│ │ ├── gisgeoprocessing
│ │ └── GisGeoprocessingData.java
│ │ ├── giscoordinatetransformation
│ │ └── GisCoordinateTransformationData.java
│ │ └── gisfileoutput
│ │ ├── GisFileOutputData.java
│ │ └── GisOutputFormatParameter.java
│ └── gis
│ └── io
│ ├── FileWriter.java
│ ├── FileReader.java
│ └── features
│ └── Value.java
├── local-maven-repo
└── org
│ └── kabeja
│ └── kabeja
│ ├── 0.4
│ ├── kabeja-0.4.jar
│ └── kabeja-0.4.pom
│ └── maven-metadata-local.xml
├── CODE_OF_CONDUCT.md
├── docker
└── hop-gis
│ ├── build.sh
│ ├── README.md
│ └── Dockerfile
└── docs
├── usage
├── geometryinfo.adoc
├── gisrelate.adoc
├── gisgroupby.adoc
├── giscoordinatetransformation.adoc
└── gisprocessing.adoc
├── README.md
└── presentation
└── README.md
/examples/config/config.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/examples/output/.gitignore:
--------------------------------------------------------------------------------
1 | *
2 | !.gitignore
3 |
--------------------------------------------------------------------------------
/examples/datasets/metadata_injection/test.cpg:
--------------------------------------------------------------------------------
1 | UTF-8
--------------------------------------------------------------------------------
/examples/datasets/velo_tour_2013/velo_tour_2013.cpg:
--------------------------------------------------------------------------------
1 | UTF-8
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/config.yml:
--------------------------------------------------------------------------------
1 | blank_issues_enabled: true
--------------------------------------------------------------------------------
/dxf/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | .settings
3 | .classpath
4 | .project
--------------------------------------------------------------------------------
/shp/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | .settings
3 | .classpath
4 | .project
--------------------------------------------------------------------------------
/geojson/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | .settings
3 | .classpath
4 | .project
--------------------------------------------------------------------------------
/gpx/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | .settings
3 | .classpath
4 | .project
--------------------------------------------------------------------------------
/mifmid/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | .settings
3 | .classpath
4 | .project
--------------------------------------------------------------------------------
/svg/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | .settings
3 | .classpath
4 | .project
--------------------------------------------------------------------------------
/concave-hull/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | .settings
3 | .classpath
4 | .project
--------------------------------------------------------------------------------
/spatialite/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | .settings
3 | .classpath
4 | .project
--------------------------------------------------------------------------------
/items-in-hop-gui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/items-in-hop-gui.png
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | target
2 | .settings
3 | .classpath
4 | .project
5 | .idea/
6 | .vscode/
7 | *.iml
8 | bin/
9 |
--------------------------------------------------------------------------------
/assemblies/src/main/resources/version.xml:
--------------------------------------------------------------------------------
1 |
2 | ${project.version}
--------------------------------------------------------------------------------
/examples/datasets/metadata_injection/test.shp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/examples/datasets/metadata_injection/test.shp
--------------------------------------------------------------------------------
/examples/datasets/metadata_injection/test.shx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/examples/datasets/metadata_injection/test.shx
--------------------------------------------------------------------------------
/examples/pipelines-and-workflows/shp2oracle.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/examples/pipelines-and-workflows/shp2oracle.png
--------------------------------------------------------------------------------
/examples/pipelines-and-workflows/shp2geojson.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/examples/pipelines-and-workflows/shp2geojson.png
--------------------------------------------------------------------------------
/examples/pipelines-and-workflows/shp2postgis.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/examples/pipelines-and-workflows/shp2postgis.png
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/resources/GisGroupBy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/hop-gis-plugins/src/main/resources/GisGroupBy.png
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/resources/GisRelate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/hop-gis-plugins/src/main/resources/GisRelate.png
--------------------------------------------------------------------------------
/examples/datasets/velo_tour_2013/velo_tour_2013.dbf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/examples/datasets/velo_tour_2013/velo_tour_2013.dbf
--------------------------------------------------------------------------------
/examples/datasets/velo_tour_2013/velo_tour_2013.shp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/examples/datasets/velo_tour_2013/velo_tour_2013.shp
--------------------------------------------------------------------------------
/examples/datasets/velo_tour_2013/velo_tour_2013.shx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/examples/datasets/velo_tour_2013/velo_tour_2013.shx
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/resources/GisFileInput.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/hop-gis-plugins/src/main/resources/GisFileInput.png
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/resources/GisFileOutput.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/hop-gis-plugins/src/main/resources/GisFileOutput.png
--------------------------------------------------------------------------------
/examples/pipelines-and-workflows/geojson2shp-types.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/examples/pipelines-and-workflows/geojson2shp-types.png
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/resources/GisGeometryInfo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/hop-gis-plugins/src/main/resources/GisGeometryInfo.png
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/resources/GisGeoprocessing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/hop-gis-plugins/src/main/resources/GisGeoprocessing.png
--------------------------------------------------------------------------------
/local-maven-repo/org/kabeja/kabeja/0.4/kabeja-0.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/local-maven-repo/org/kabeja/kabeja/0.4/kabeja-0.4.jar
--------------------------------------------------------------------------------
/spatialite/src/main/resources/templates/spatialite_v4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/spatialite/src/main/resources/templates/spatialite_v4
--------------------------------------------------------------------------------
/examples/datasets/metadata_injection/test.prj:
--------------------------------------------------------------------------------
1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/resources/GisCoordinateTransformation.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/hop-gis-plugins/src/main/resources/GisCoordinateTransformation.png
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/question.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: ❓ Question
3 | about: If you have a question 🙋
4 | title: '[Question] '
5 | labels: question
6 | ---
7 |
8 | What is your question?
9 |
--------------------------------------------------------------------------------
/examples/datasets/velo_tour_2013/velo_tour_2013.prj:
--------------------------------------------------------------------------------
1 | GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]
--------------------------------------------------------------------------------
/examples/pipelines-and-workflows/A000-MI-metadata-injection-test.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/atolcd/hop-gis-plugins/HEAD/examples/pipelines-and-workflows/A000-MI-metadata-injection-test.png
--------------------------------------------------------------------------------
/svg/src/main/java/com/atolcd/gis/svg/type/container/Defs.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.svg.type.container;
2 |
3 | import com.atolcd.gis.svg.type.AbstractContainer;
4 |
5 | public class Defs extends AbstractContainer {}
6 |
--------------------------------------------------------------------------------
/svg/src/main/java/com/atolcd/gis/svg/type/container/Group.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.svg.type.container;
2 |
3 | import com.atolcd.gis.svg.type.AbstractContainer;
4 |
5 | public class Group extends AbstractContainer {}
6 |
--------------------------------------------------------------------------------
/geojson/src/main/java/org/wololo/geojson/Geometry.java:
--------------------------------------------------------------------------------
1 | package org.wololo.geojson;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 |
5 | public abstract class Geometry extends GeoJSON {
6 | @JsonCreator
7 | public Geometry() {
8 | super();
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/examples/datasets/metadata_injection/test.qpj:
--------------------------------------------------------------------------------
1 | GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
2 |
--------------------------------------------------------------------------------
/gpx/src/main/java/com/atolcd/gis/gpx/IElement.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.gpx;
2 |
3 | public interface IElement {
4 |
5 | public void setName(String name);
6 |
7 | public void setDescription(String description);
8 |
9 | public String getName();
10 |
11 | public String getDescription();
12 | }
13 |
--------------------------------------------------------------------------------
/examples/datasets/metadata_injection/test.dbf:
--------------------------------------------------------------------------------
1 | z a [ id N
2 | label C P
0AAA 2BBB
--------------------------------------------------------------------------------
/shp/src/main/java/org/geotools/dbffile/DbfFileException.java:
--------------------------------------------------------------------------------
1 | package org.geotools.dbffile;
2 |
3 | /** Thrown when an error relating to the shapefile occures */
4 | @SuppressWarnings("serial")
5 | public class DbfFileException extends Exception {
6 | public DbfFileException(String s) {
7 | super(s);
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | ## Code of Conduct
2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct).
3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact
4 | opensource-codeofconduct@amazon.com with any additional questions or comments.
5 |
--------------------------------------------------------------------------------
/examples/project-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description" : "Examples of Apache Hop GIS Plugins",
3 | "metadataBaseFolder" : "${PROJECT_HOME}/metadata",
4 | "unitTestsBasePath" : "${PROJECT_HOME}",
5 | "dataSetsCsvFolder" : "${PROJECT_HOME}/datasets",
6 | "enforcingExecutionInHome" : true,
7 | "parentProjectName" : "default",
8 | "config" : {
9 | "variables" : [ ]
10 | }
11 | }
--------------------------------------------------------------------------------
/svg/src/main/java/com/atolcd/gis/svg/type/AbstractGraphic.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.svg.type;
2 |
3 | public abstract class AbstractGraphic extends AbstractElement {
4 |
5 | @SuppressWarnings("serial")
6 | public class SvgAbstractGraphicException extends Exception {
7 |
8 | public SvgAbstractGraphicException(String message) {
9 | super(message);
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/svg/src/main/java/com/atolcd/gis/svg/type/graphic/Path.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.svg.type.graphic;
2 |
3 | import com.atolcd.gis.svg.type.AbstractGraphic;
4 |
5 | public class Path extends AbstractGraphic {
6 |
7 | private String data;
8 |
9 | public Path(String data) {
10 | this.data = data;
11 | }
12 |
13 | public String getData() {
14 | return data;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/local-maven-repo/org/kabeja/kabeja/maven-metadata-local.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.kabeja
4 | kabeja
5 |
6 | 0.4
7 |
8 | 0.4
9 |
10 | 20150630070643
11 |
12 |
13 |
--------------------------------------------------------------------------------
/docker/hop-gis/build.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 |
3 | readonly ROOT_DIR=$(realpath "$(dirname "$0")/../..")
4 | cd $ROOT_DIR
5 |
6 | HOP_VERSION=$1
7 |
8 | # Build artefacts and runnable image
9 | docker build . -f docker/hop-gis/Dockerfile \
10 | --build-arg="HOP_VERSION=$HOP_VERSION" \
11 | --network=host --force-rm \
12 | -t atolcd/hop-gis \
13 | \
14 | || { echo 'Image build failed' ; exit 1; }
15 |
--------------------------------------------------------------------------------
/shp/src/main/java/org/geotools/shapefile/ShapefileException.java:
--------------------------------------------------------------------------------
1 | package org.geotools.shapefile;
2 |
3 | /** Thrown when an error relating to the shapefile occurs */
4 | @SuppressWarnings("serial")
5 | public class ShapefileException extends Exception {
6 | public ShapefileException() {
7 | super();
8 | }
9 |
10 | public ShapefileException(String s) {
11 | super(s);
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/svg/src/main/java/com/atolcd/gis/svg/type/style/ExternalStyle.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.svg.type.style;
2 |
3 | import com.atolcd.gis.svg.type.AbstractStyle;
4 |
5 | public class ExternalStyle extends AbstractStyle {
6 |
7 | private String href;
8 |
9 | public ExternalStyle(String href) {
10 | this.href = href;
11 | }
12 |
13 | public String getHref() {
14 | return href;
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/shp/src/main/java/org/geotools/shapefile/InvalidShapefileException.java:
--------------------------------------------------------------------------------
1 | package org.geotools.shapefile;
2 |
3 | /**
4 | * Thrown when an attempt is made to load a shapefile which contains an error such as an invalid
5 | * shape
6 | */
7 | @SuppressWarnings("serial")
8 | public class InvalidShapefileException extends ShapefileException {
9 | public InvalidShapefileException(String s) {
10 | super(s);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/shp/src/main/java/org/geotools/shapefile/ShapeTypeNotSupportedException.java:
--------------------------------------------------------------------------------
1 | package org.geotools.shapefile;
2 |
3 | /**
4 | * Thrown when an attempt is made to load a shapefile which contains a shape type that is not
5 | * supported by the loader
6 | */
7 | @SuppressWarnings("serial")
8 | public class ShapeTypeNotSupportedException extends ShapefileException {
9 | public ShapeTypeNotSupportedException(String s) {
10 | super(s);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/docker/hop-gis/README.md:
--------------------------------------------------------------------------------
1 | # Apache Hop GIS Plugins - Docker
2 |
3 | Execute the script with the right HOP version, from the root dir:
4 | ```sh
5 | # Read Hop version in pom.xml
6 | HOP_VERSION=$(grep -Po '\K[^<]+' pom.xml)
7 | # HOP_VERSION="2.14.0"
8 |
9 | docker/hop-gis/build.sh ${HOP_VERSION}
10 | ```
11 |
12 | At the end, your image should be ready with the `latest` tag :
13 | ```sh
14 | docker images --filter=reference='atolcd/hop*'
15 | ```
--------------------------------------------------------------------------------
/gpx/src/main/java/com/atolcd/gis/gpx/ISpatialElement.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.gpx;
2 |
3 | import org.locationtech.jts.geom.Geometry;
4 |
5 | public interface ISpatialElement extends IElement {
6 |
7 | public void setComment(String comment);
8 |
9 | public void setSource(String source);
10 |
11 | public void setType(String type);
12 |
13 | public String getComment();
14 |
15 | public String getSource();
16 |
17 | public String getType();
18 |
19 | public Geometry getGeometry();
20 | }
21 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/xml/ConsoleSerializer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Created on 28.11.2005
3 | *
4 | */
5 | package org.kabeja.xml;
6 |
7 | import java.io.OutputStream;
8 |
9 | /**
10 | * @author simon
11 | */
12 | public class ConsoleSerializer extends SAXPrettyOutputter {
13 | /* (non-Javadoc)
14 | * @see org.kabeja.xml.SAXSerializer#setOutput(java.io.OutputStream)
15 | */
16 | public void setOutput(OutputStream out) {
17 | // switch output to console
18 | super.setOutput(System.out);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/docs/usage/geometryinfo.adoc:
--------------------------------------------------------------------------------
1 | # Geometry information
2 | Returns geometry information.
3 |
4 | ## Fields
5 |
6 | [width="90%", options="header"]
7 | |===
8 | |Field | Description
9 | |Name | Name of the transformation
10 | |Geometry |
11 | 2+|**Information Field**
12 | |Area |
13 | |Dimension (2D/3D) |
14 | |EPSG code (SRID) |
15 | |Geometry type |
16 | |Length |
17 | |Nullity |
18 | |Number of coordinates |
19 | |Number of geometries |
20 | |X max |
21 | |X min |
22 | |Y max |
23 | |Y min |
24 | |Z max |
25 | |Z min |
26 | |===
27 |
--------------------------------------------------------------------------------
/local-maven-repo/org/kabeja/kabeja/0.4/kabeja-0.4.pom:
--------------------------------------------------------------------------------
1 |
2 |
4 | 4.0.0
5 | org.kabeja
6 | kabeja
7 | 0.4
8 | POM was created from install:install-file
9 |
10 |
--------------------------------------------------------------------------------
/geojson/src/main/java/org/wololo/geojson/Point.java:
--------------------------------------------------------------------------------
1 | package org.wololo.geojson;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 |
6 | public class Point extends Geometry {
7 | private final double[] coordinates;
8 |
9 | @JsonCreator
10 | public Point(@JsonProperty("coordinates") double[] coordinates) {
11 | super();
12 | this.coordinates = coordinates;
13 | }
14 |
15 | public double[] getCoordinates() {
16 | return coordinates;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: 🐜 Bug report
3 | about: If something isn't working 🔧
4 | title: '[Bug] '
5 | labels: bug
6 | ---
7 |
8 | **What happened:**
9 |
10 | **What you expected to happen:**
11 |
12 | **Steps to reproduce:**
13 |
14 | **Anything else we need to know?**
15 |
16 | **Environment:**
17 | * Hop:
18 | * Hop GIS Plugins:
19 | * JVM:
20 | * OS:
21 |
22 | **Any suggested solutions?**
23 |
24 | **If the bug is approved, would you be willing to submit a PR?**
25 |
26 | Yes / No
27 |
--------------------------------------------------------------------------------
/geojson/src/main/java/org/wololo/geojson/Polygon.java:
--------------------------------------------------------------------------------
1 | package org.wololo.geojson;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 |
6 | public class Polygon extends Geometry {
7 | private final double[][][] coordinates;
8 |
9 | @JsonCreator
10 | public Polygon(@JsonProperty("coordinates") double[][][] coordinates) {
11 | super();
12 | this.coordinates = coordinates;
13 | }
14 |
15 | public double[][][] getCoordinates() {
16 | return coordinates;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/geojson/src/main/java/org/wololo/geojson/LineString.java:
--------------------------------------------------------------------------------
1 | package org.wololo.geojson;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 |
6 | public class LineString extends Geometry {
7 | private final double[][] coordinates;
8 |
9 | @JsonCreator
10 | public LineString(@JsonProperty("coordinates") double[][] coordinates) {
11 | super();
12 | this.coordinates = coordinates;
13 | }
14 |
15 | public double[][] getCoordinates() {
16 | return coordinates;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/geojson/src/main/java/org/wololo/geojson/MultiPoint.java:
--------------------------------------------------------------------------------
1 | package org.wololo.geojson;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 |
6 | public class MultiPoint extends Geometry {
7 | private final double[][] coordinates;
8 |
9 | @JsonCreator
10 | public MultiPoint(@JsonProperty("coordinates") double[][] coordinates) {
11 | super();
12 | this.coordinates = coordinates;
13 | }
14 |
15 | public double[][] getCoordinates() {
16 | return coordinates;
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: ❓ Feature request
3 | about: If you want to suggest a feature 💡
4 | title: '[Feature] '
5 | labels: enhancement
6 | ---
7 |
8 | **What would you like to be added:**
9 |
10 | **Alternatives:**
11 |
12 | Can you achieve the same result doing it in an alternative way? Is the alternative considerable?
13 |
14 | **Has the feature been requested before?**
15 |
16 | Please provide a link to the issue.
17 |
18 | **If the feature request is approved, would you be willing to submit a PR?**
19 |
20 | Yes / No
21 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/DXFXLine.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Created on 17.10.2005
3 | *
4 | */
5 | package org.kabeja.dxf;
6 |
7 | /**
8 | * @author entities;
10 |
11 | public Layer(String name) {
12 | this.name = name;
13 | this.entities = new ArrayList();
14 | }
15 |
16 | public String getName() {
17 | return name;
18 | }
19 |
20 | public List getEntities() {
21 | return entities;
22 | }
23 |
24 | protected void setName(String name) {
25 | this.name = name;
26 | }
27 |
28 | protected void setEntities(List entities) {
29 | this.entities = entities;
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/svg/src/main/java/com/atolcd/gis/svg/type/AbstractContainer.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.svg.type;
2 |
3 | import java.util.ArrayList;
4 | import java.util.List;
5 |
6 | public abstract class AbstractContainer extends AbstractElement {
7 |
8 | private List elements;
9 |
10 | public AbstractContainer() {
11 | this.elements = new ArrayList();
12 | }
13 |
14 | public List getElements() {
15 | return elements;
16 | }
17 |
18 | @SuppressWarnings("serial")
19 | public class SvgAbstractContainerException extends Exception {
20 |
21 | public SvgAbstractContainerException(String message) {
22 | super(message);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/spatialite/src/main/java/com/atolcd/gis/spatialite/Row.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.spatialite;
2 |
3 | import java.util.HashMap;
4 |
5 | public class Row {
6 |
7 | private HashMap values;
8 |
9 | public Row() {
10 | this.values = new HashMap();
11 | }
12 |
13 | public void addValue(String fieldName, Object value) {
14 | values.put(fieldName, value);
15 | }
16 |
17 | public Object getValue(String fieldName) {
18 | return values.get(fieldName);
19 | }
20 |
21 | public void addValue(Field field, Object value) {
22 | values.put(field.getName(), value);
23 | }
24 |
25 | public Object getValue(Field field) {
26 | return values.get(field.getName());
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/geojson/src/main/java/org/wololo/geojson/Crs.java:
--------------------------------------------------------------------------------
1 | package org.wololo.geojson;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 | import java.util.Map;
6 |
7 | public class Crs extends GeoJSON {
8 | private final String type;
9 | private final Map properties;
10 |
11 | @JsonCreator
12 | public Crs(
13 | @JsonProperty("type") String type,
14 | @JsonProperty("properties") Map properties) {
15 | super();
16 | this.type = type;
17 | this.properties = properties;
18 | }
19 |
20 | public String getType() {
21 | return type;
22 | }
23 |
24 | public Map getProperties() {
25 | return properties;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/.github/stale.yml:
--------------------------------------------------------------------------------
1 | # Number of days of inactivity before an issue becomes stale
2 | daysUntilStale: 32
3 | # Number of days of inactivity before a stale issue is closed
4 | daysUntilClose: 15
5 | # Issues with these labels will never be considered stale
6 | exemptLabels:
7 | - pinned
8 | - security
9 | - planned
10 | # Label to use when marking an issue as stale
11 | staleLabel: wontfix
12 | # Comment to post when marking an issue as stale. Set to `false` to disable
13 | markComment: >
14 | This issue has been automatically marked as stale because it has not had
15 | recent activity. It will be closed if no further activity occurs. Thank you
16 | for your contributions.
17 | # Comment to post when closing a stale issue. Set to `false` to disable
18 | closeComment: false
19 |
--------------------------------------------------------------------------------
/geojson/src/main/java/org/wololo/geojson/FeatureCollection.java:
--------------------------------------------------------------------------------
1 | package org.wololo.geojson;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 | import com.fasterxml.jackson.databind.annotation.JsonSerialize;
6 |
7 | public class FeatureCollection extends GeoJSON {
8 |
9 | private final Feature[] features;
10 | @JsonSerialize() private final Crs crs;
11 |
12 | @JsonCreator
13 | public FeatureCollection(
14 | @JsonProperty("features") Feature[] features, @JsonProperty("crs") Crs crs) {
15 | super();
16 | this.features = features;
17 | this.crs = crs;
18 | }
19 |
20 | public Feature[] getFeatures() {
21 | return features;
22 | }
23 |
24 | public Crs getCrs() {
25 | return crs;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/examples/datasets/velo_tour_2013/velo_tour_2013.qmd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | dataset
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | 0
17 | 0
18 |
19 |
20 |
21 |
22 | false
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/DXFExtendedData.java:
--------------------------------------------------------------------------------
1 | package org.kabeja.dxf;
2 |
3 | public class DXFExtendedData {
4 |
5 | private String name;
6 | private Class> type;
7 | private Object value;
8 |
9 | public DXFExtendedData(String name) {
10 | this.name = name;
11 | this.type = null;
12 | this.value = null;
13 | }
14 |
15 | public String getName() {
16 | return name;
17 | }
18 |
19 | public void setName(String name) {
20 | this.name = name;
21 | }
22 |
23 | public Class> getType() {
24 | return type;
25 | }
26 |
27 | public void setType(Class> type) {
28 | this.type = type;
29 | }
30 |
31 | public Object getValue() {
32 | return value;
33 | }
34 |
35 | public void setValue(Object value) {
36 | this.value = value;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/geojson/src/main/java/org/wololo/geojson/Feature.java:
--------------------------------------------------------------------------------
1 | package org.wololo.geojson;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 | import java.util.Map;
6 |
7 | public class Feature extends GeoJSON {
8 | private final Geometry geometry;
9 | private final Map properties;
10 |
11 | @JsonCreator
12 | public Feature(
13 | @JsonProperty("geometry") Geometry geometry,
14 | @JsonProperty("properties") Map properties) {
15 | super();
16 | this.geometry = geometry;
17 | this.properties = properties;
18 | }
19 |
20 | public Geometry getGeometry() {
21 | return geometry;
22 | }
23 |
24 | public Map getProperties() {
25 | return properties;
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/dxf/src/main/java/com/atolcd/gis/dxf/ExtendedData.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.dxf;
2 |
3 | public class ExtendedData {
4 |
5 | private String name;
6 | private Class> type;
7 | private Object value;
8 |
9 | public ExtendedData(String name, Class> type, Object value) {
10 | this.name = name;
11 | this.type = type;
12 | this.value = value;
13 | }
14 |
15 | public String getName() {
16 | return name;
17 | }
18 |
19 | public void setName(String name) {
20 | this.name = name;
21 | }
22 |
23 | public Class> getType() {
24 | return type;
25 | }
26 |
27 | public void setType(Class> type) {
28 | this.type = type;
29 | }
30 |
31 | public Object getValue() {
32 | return value;
33 | }
34 |
35 | public void setValue(Object value) {
36 | this.value = value;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/processing/AbstractPostProcessor.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.processing;
17 |
18 | public abstract class AbstractPostProcessor extends AbstractConfigurable implements PostProcessor {}
19 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/helpers/HatchPattern.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.dxf.helpers;
17 |
18 | /**
19 | * @author Simon Mieth
20 | */
21 | public class HeaderModes {
22 | public static final int ACADVER = 1;
23 | }
24 |
--------------------------------------------------------------------------------
/dxf/src/main/java/fr/michaelm/jump/drivers/dxf/DxfXDATA.java:
--------------------------------------------------------------------------------
1 | package fr.michaelm.jump.drivers.dxf;
2 |
3 | public class DxfXDATA {
4 |
5 | public static int GROUPCODE_XDATA_APP_NAME = 1001;
6 | public static int GROUPCODE_XDATA_STRING = 1000;
7 | public static int GROUPCODE_XDATA_BINARY = 1004;
8 | public static int GROUPCODE_XDATA_REAL = 1040;
9 | public static int GROUPCODE_XDATA_INTEGER = 1070;
10 | public static int GROUPCODE_XDATA_LONG = 1071;
11 |
12 | private String name;
13 | private int code;
14 | private Object value;
15 |
16 | public DxfXDATA(String name, int code, Object value) {
17 | this.name = name;
18 | this.code = code;
19 | this.value = value;
20 | }
21 |
22 | public String getName() {
23 | return name;
24 | }
25 |
26 | public int getCode() {
27 | return code;
28 | }
29 |
30 | public Object getValue() {
31 | return value;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/Component.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | /**
19 | * This is the base interface for every component in the application.
20 | *
21 | * @author Simon Mieth
22 | */
23 | public interface Component {}
24 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/HandlerManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser;
17 |
18 | /**
19 | * @author Simon Mieth
20 | */
21 | public interface HandlerManager extends Handler {
22 | public void addHandler(Handler handler);
23 | }
24 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/UIException.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | public class UIException extends Exception {
19 | public UIException(Exception e) {
20 | super(e);
21 | }
22 |
23 | public UIException(String message) {
24 | super(message);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/dxf/DXFHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser.dxf;
17 |
18 | import org.kabeja.parser.DXFValue;
19 | import org.kabeja.parser.ParseException;
20 |
21 | public interface DXFHandler {
22 | public void parseGroup(int groupCode, DXFValue value) throws ParseException;
23 | }
24 |
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/java/com/atolcd/hop/core/row/value/GeometryInterface.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.hop.core.row.value;
2 |
3 | import java.sql.ResultSetMetaData;
4 | import org.apache.hop.core.database.DatabaseMeta;
5 | import org.apache.hop.core.exception.HopDatabaseException;
6 | import org.apache.hop.core.exception.HopValueException;
7 | import org.apache.hop.core.row.IValueMeta;
8 | import org.apache.hop.core.variables.IVariables;
9 | import org.locationtech.jts.geom.Geometry;
10 |
11 | /** Created by Sudhanshu-Tango on 1/13/2017. */
12 | public interface GeometryInterface {
13 | Geometry getGeometry(Object object) throws HopValueException;
14 |
15 | IValueMeta getValueFromSqlType(
16 | IVariables variables,
17 | DatabaseMeta databaseMeta,
18 | String name,
19 | ResultSetMetaData rm,
20 | int index,
21 | boolean ignoreLength,
22 | boolean lazyConversion)
23 | throws HopDatabaseException;
24 | }
25 |
--------------------------------------------------------------------------------
/examples/datasets/metadata_injection/test.geojson:
--------------------------------------------------------------------------------
1 | {
2 | "type": "FeatureCollection",
3 | "features": [
4 | {
5 | "type": "Feature",
6 | "properties": {
7 | "id" : 1
8 | },
9 | "geometry": {
10 | "type": "Point",
11 | "coordinates": [
12 | 1.77978515625,
13 | 44.653024159812
14 | ]
15 | }
16 | },
17 | {
18 | "type": "Feature",
19 | "properties": {
20 | "id" : 2
21 | },
22 | "geometry": {
23 | "type": "Point",
24 | "coordinates": [
25 | 3.6474609374999996,
26 | 45.47554027158593
27 | ]
28 | }
29 | },
30 | {
31 | "type": "Feature",
32 | "properties": {
33 | "id" : 3
34 | },
35 | "geometry": {
36 | "type": "Point",
37 | "coordinates": [
38 | 5.80078125,
39 | 44.41808794374846
40 | ]
41 | }
42 | }
43 | ]
44 | }
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/DXF3DFace.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Created on 29.09.2005
3 | *
4 | */
5 | package org.kabeja.dxf;
6 |
7 | import org.kabeja.math.MathUtils;
8 |
9 | /**
10 | * @author simon
11 | */
12 | public class DXF3DFace extends DXFSolid {
13 | public String getType() {
14 | return DXFConstants.ENTITY_TYPE_3DFACE;
15 | }
16 |
17 | public double getLength() {
18 | double length = 0.0;
19 | int flag = this.getFlags();
20 |
21 | if ((flag & 1) == 0) {
22 | length += MathUtils.distance(this.getPoint1(), this.getPoint2());
23 | }
24 |
25 | if ((flag & 2) == 0) {
26 | length += MathUtils.distance(this.getPoint2(), this.getPoint3());
27 | }
28 |
29 | if ((flag & 4) == 0) {
30 | length += MathUtils.distance(this.getPoint3(), this.getPoint4());
31 | }
32 |
33 | if ((flag & 8) == 0) {
34 | length += MathUtils.distance(this.getPoint4(), this.getPoint1());
35 | }
36 |
37 | return length;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/processing/event/ProcessingEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.processing.event;
17 |
18 | import org.kabeja.processing.ProcessPipeline;
19 |
20 | public class ProcessingEvent {
21 | protected ProcessPipeline pipeline;
22 |
23 | public ProcessPipeline getProcessPipeline() {
24 | return this.pipeline;
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/Startable.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | /**
19 | * A Startable component will started at Application starts and stopped at the application stop.
20 | *
21 | * @author Simon Mieth
22 | */
23 | public interface Startable extends Component {
24 | public void start();
25 |
26 | public void stop();
27 | }
28 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/DXFBody.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.dxf;
17 |
18 | /**
19 | * @author Simon Mieth
9 | */
10 | public class DXFLWPolyline extends DXFPolyline {
11 | private double constantwidth = 0.0;
12 | private double elevation = 0.0;
13 |
14 | public DXFLWPolyline() {}
15 |
16 | public void setConstantWidth(double width) {
17 | this.constantwidth = width;
18 | }
19 |
20 | public double getContstantWidth() {
21 | return this.constantwidth;
22 | }
23 |
24 | /**
25 | * @return Returns the elevation.
26 | */
27 | public double getElevation() {
28 | return elevation;
29 | }
30 |
31 | /**
32 | * @param elevation The elevation to set.
33 | */
34 | public void setElevation(double elevation) {
35 | this.elevation = elevation;
36 | }
37 |
38 | /* (non-Javadoc)
39 | * @see de.miethxml.kabeja.dxf.DXFEntity#getType()
40 | */
41 | public String getType() {
42 | return DXFConstants.ENTITY_TYPE_LWPOLYLINE;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/Handler.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser;
17 |
18 | import org.kabeja.dxf.DXFDocument;
19 |
20 | /**
21 | * This is a simple marker-interface. Every parser part must implement this interface.
22 | *
23 | * @author Simon Mieth
24 | */
25 | public interface Handler {
26 | public void setDXFDocument(DXFDocument doc);
27 |
28 | public void releaseDXFDocument();
29 | }
30 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/processing/ProcessorException.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.processing;
17 |
18 | /**
19 | * @author Simon Mieth
20 | */
21 | public class ProcessorException extends Exception {
22 | public ProcessorException() {}
23 |
24 | public ProcessorException(Exception e) {
25 | super(e);
26 | }
27 |
28 | public ProcessorException(String msg) {
29 | super(msg);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/PropertiesListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | import java.util.Map;
19 |
20 | /**
21 | * @author Simon Mieth
22 | */
23 | public interface PropertiesListener {
24 | /**
25 | * Will be called every time the properties have changed
26 | *
27 | * @param properties changed Properties
28 | */
29 | public void propertiesChanged(Map properties);
30 | }
31 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/ParseException.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser;
17 |
18 | /**
19 | * @author points;
12 |
13 | public TrackSegment() {
14 | this.points = new ArrayList();
15 | }
16 |
17 | public TrackSegment(LineString geometry) throws WayPointException {
18 |
19 | this.points = new ArrayList();
20 | if (geometry != null && !geometry.isEmpty()) {
21 |
22 | for (Coordinate coordinate : geometry.getCoordinates()) {
23 | this.points.add(new WayPoint(coordinate));
24 | }
25 | }
26 | }
27 |
28 | public TrackSegment(List points) {
29 |
30 | if (points == null) {
31 | this.points = new ArrayList();
32 | } else {
33 | this.points = points;
34 | }
35 | }
36 |
37 | public List getPoints() {
38 | return points;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/xml/SAXFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.xml;
17 |
18 | import org.kabeja.processing.Configurable;
19 | import org.xml.sax.ContentHandler;
20 |
21 | /**
22 | * A SAXFilter consumes SAX events and passes SAX event to the next org.xml.sax.ContentHandler.
23 | *
24 | * @author Simon Mieth
25 | */
26 | public interface SAXFilter extends ContentHandler, Configurable {
27 | public void setContentHandler(ContentHandler handler);
28 | }
29 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/math/NURBSAutoStepPointIterator.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.math;
17 |
18 | import java.util.Iterator;
19 |
20 | public class NURBSAutoStepPointIterator implements Iterator {
21 | public boolean hasNext() {
22 | // TODO Auto-generated method stub
23 | return false;
24 | }
25 |
26 | public Object next() {
27 | // TODO Auto-generated method stub
28 | return null;
29 | }
30 |
31 | public void remove() {
32 | // TODO Auto-generated method stub
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/Serviceable.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | /**
19 | * A component which implement this interface get access to the services which are provided by this
20 | * application.
21 | *
22 | * @author Simon Mieth
23 | */
24 | public interface Serviceable {
25 | /**
26 | * Set the @see ServiceManager of the application.
27 | *
28 | * @param manager
29 | */
30 | public void setServiceManager(ServiceManager manager);
31 | }
32 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/Application.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | /**
19 | * Main application service for starting and stopping the application.
20 | *
21 | * @author Simon Mieth
22 | */
23 | public interface Application extends Component {
24 | public static final String SERVICE = Application.class.getName();
25 |
26 | /** Starts the application. */
27 | public void start();
28 |
29 | /** Stops the application */
30 | public void stop();
31 | }
32 |
--------------------------------------------------------------------------------
/gpx/src/main/java/com/atolcd/gis/gpx/type/AbstractSpatialElement.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.gpx.type;
2 |
3 | import org.locationtech.jts.geom.GeometryFactory;
4 |
5 | public abstract class AbstractSpatialElement extends AbstractElement {
6 |
7 | private static GeometryFactory geometryFactory = new GeometryFactory();
8 |
9 | private String comment;
10 | private String source;
11 | private String type;
12 |
13 | public AbstractSpatialElement() {
14 | super();
15 | this.comment = null;
16 | this.source = null;
17 | this.type = null;
18 | }
19 |
20 | public String getComment() {
21 | return comment;
22 | }
23 |
24 | public void setComment(String comment) {
25 | this.comment = comment;
26 | }
27 |
28 | public String getSource() {
29 | return source;
30 | }
31 |
32 | public void setSource(String source) {
33 | this.source = source;
34 | }
35 |
36 | public String getType() {
37 | return type;
38 | }
39 |
40 | public void setType(String type) {
41 | this.type = type;
42 | }
43 |
44 | public static GeometryFactory getGeometryFactory() {
45 | return geometryFactory;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/ApplicationToolBar.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | import javax.swing.Action;
19 |
20 | /**
21 | * Application toolbar service provides access to the application toolbar for components.
22 | *
23 | * @author Simon Mieth
24 | */
25 | public interface ApplicationToolBar {
26 | public static final String SERVICE = ApplicationToolBar.class.getName();
27 |
28 | public void addAction(Action action);
29 |
30 | public void addAction(java.awt.Component component);
31 | }
32 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/ServiceManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | /**
19 | * The Service Manager provides access to services of the application. You can query the Service
20 | * Manager for service.
21 | *
22 | * @author Simon Mieth
23 | */
24 | public interface ServiceManager {
25 |
26 | /**
27 | * @param service the searched service
28 | * @return an array of Components which provides the service
29 | */
30 | public Component[] getServiceComponents(String service);
31 | }
32 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/dxf/filter/AbstractDXFStreamFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser.dxf.filter;
17 |
18 | import java.util.Map;
19 | import org.kabeja.parser.dxf.DXFHandler;
20 |
21 | public abstract class AbstractDXFStreamFilter implements DXFStreamFilter {
22 | protected Map properties;
23 | protected DXFHandler handler;
24 |
25 | public void setProperties(Map properties) {
26 | this.properties = properties;
27 | }
28 |
29 | public void setDXFHandler(DXFHandler handler) {
30 | this.handler = handler;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/docs/presentation/README.md:
--------------------------------------------------------------------------------
1 | # Apache Hop GIS Plugins - Marp presentation
2 |
3 | This presentation has been written in plain Markdown and is intended to be managed with [Marp](https://marp.app/).
4 |
5 | You can use [Marp for VS Code](https://marketplace.visualstudio.com/items?itemName=marp-team.marp-vscode) for convenience or use [Marp CLI](https://github.com/marp-team/marp-cli) from this directory:
6 |
7 | Edit and check this presentation:
8 | ```sh
9 | # Server mode (Pass directory to serve)
10 | npx @marp-team/marp-cli@latest -s .
11 |
12 | # Watch mode (html is produced when source file is saved)
13 | npx @marp-team/marp-cli@latest -w presentation.md
14 | ```
15 |
16 | Convert the presentation:
17 | ```sh
18 | # to HTML (-o presentation.html)
19 | npx @marp-team/marp-cli@latest presentation.md
20 |
21 | # to PDF (-o presentation.pdf)
22 | npx @marp-team/marp-cli@latest presentation.md --pdf
23 |
24 | # to PowerPoint document (-o presentation.pptx)
25 | npx @marp-team/marp-cli@latest presentation.md --pptx
26 | ```
27 |
28 |
29 | Our company
30 | ---------------------
31 | [Atol Conseils et Développements](http://www.atolcd.com)
32 | Follow us on twitter [@atolcd](https://twitter.com/atolcd)
33 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/AbstractSectionHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser;
17 |
18 | import org.kabeja.dxf.DXFDocument;
19 |
20 | /**
21 | * @author Simon Mieth
24 | */
25 | public interface DXFObjectHandler extends Handler {
26 | public String getObjectType();
27 |
28 | public void startObject();
29 |
30 | public void parseGroup(int groupCode, DXFValue value);
31 |
32 | public void endObject();
33 |
34 | public DXFObject getDXFObject();
35 | }
36 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/table/DXFTableHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser.table;
17 |
18 | import org.kabeja.dxf.DXFDocument;
19 | import org.kabeja.parser.DXFValue;
20 | import org.kabeja.parser.Handler;
21 |
22 | /**
23 | * @author Simon Mieth
24 | */
25 | public interface DXFTableHandler extends Handler {
26 | public String getTableKey();
27 |
28 | public void setDXFDocument(DXFDocument doc);
29 |
30 | public void startParsing();
31 |
32 | public void parseGroup(int groupCode, DXFValue value);
33 |
34 | public void endParsing();
35 | }
36 |
--------------------------------------------------------------------------------
/docs/usage/gisgroupby.adoc:
--------------------------------------------------------------------------------
1 | # Geospatial group by
2 | Returns geometry information.
3 |
4 | ## Fields
5 |
6 | [width="90%", options="header"]
7 | |===
8 | |Field | | Description |
9 | 2+|Name 2+| Name of the transformation
10 | 2+|Include all rows? 2+| true / false
11 | 2+|Temporary files directory 2+| `%%java.io.tmpdir%%`
12 | 2+|TMP-file prefix 2+| grp
13 | 2+|Add line number, restart each group 2+| true / false
14 | 2+|Line number field name 2+|
15 | 2+|Allways give back a result row 2+| true / false
16 | 2+|The fields that make up the group 2+| select 1 or more fields
17 | 4+|**Aggregates** (1 or more fields)
18 | |_Name_ | _Subject_ | _Type_ | _Value_
19 | |===
20 |
21 | Type :
22 |
23 | - Sum
24 | - Average (mean)
25 | - Meridian
26 | - Percentile
27 | - Minimum
28 | - Maximum
29 | - Number of values (N)
30 | - Concatenate strings separated by ,
31 | - First non-null value
32 | - Last non-null value
33 | - First value
34 | - Last value
35 | - Cumulative sum (all rows option only!)
36 | - Cumulative average (all rows option only!)
37 | - Standard deviation
38 | - Concatenate strings separated by
39 | - Number of Distinct Values (N)
40 | - Number of rows (without field argument)
41 | - Geometry union
42 | - Geometry extent
43 | - Geometry collect
44 | - Geometry dissolve
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/ProcessingUIComponent.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | import org.kabeja.processing.ProcessingManager;
19 |
20 | /**
21 | * A ProcessingUIComponent gets access to the current Processing Manager of the application.
22 | *
23 | * @author Simon Mieth
24 | */
25 | public interface ProcessingUIComponent extends Component {
26 | /**
27 | * Set the current @see ProcessingManager of the application. Could be called multiple times.
28 | *
29 | * @param manager
30 | */
31 | public void setProcessingManager(ProcessingManager manager);
32 | }
33 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/entities/DXFTraceHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser.entities;
17 |
18 | import org.kabeja.dxf.DXFConstants;
19 | import org.kabeja.dxf.DXFTrace;
20 |
21 | /**
22 | * @author Simon Mieth
23 | */
24 | public class DXFTraceHandler extends DXFSolidHandler {
25 | public String getDXFEntityName() {
26 | return DXFConstants.ENTITY_TYPE_TRACE;
27 | }
28 |
29 | /* (non-Javadoc)
30 | * @see de.miethxml.kabeja.parser.entities.DXFEntityHandler#startDXFEntity()
31 | */
32 | public void startDXFEntity() {
33 | solid = new DXFTrace();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/ViewComponent.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | import javax.swing.JComponent;
19 |
20 | /**
21 | * A ViewComponent provides a view and title for the Processing.
22 | *
23 | * @author Simon Mieth
24 | */
25 | public interface ViewComponent extends ProcessingUIComponent {
26 | public static final String SERVICE = ViewComponent.class.getName();
27 |
28 | /**
29 | * @return the title of the component
30 | */
31 | abstract String getTitle();
32 |
33 | /**
34 | * @return the view of this component
35 | */
36 | abstract JComponent getView();
37 | }
38 |
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/java/com/atolcd/hop/pipeline/transforms/gisrelate/GisRelateData.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.hop.pipeline.transforms.gisrelate;
2 |
3 | /*
4 | * #%L
5 | * Apache Hop GIS Plugin
6 | * %%
7 | * Copyright (C) 2021 Atol CD
8 | * %%
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Lesser General Public License as
11 | * published by the Free Software Foundation, either version 3 of the
12 | * License, or (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Lesser Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Lesser Public
20 | * License along with this program. If not, see
21 | * .
22 | * #L%
23 | */
24 |
25 | import org.apache.hop.core.row.IRowMeta;
26 | import org.apache.hop.pipeline.transform.BaseTransformData;
27 |
28 | public class GisRelateData extends BaseTransformData {
29 |
30 | public IRowMeta outputRowMeta;
31 |
32 | public GisRelateData() {
33 | super();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/java/com/atolcd/hop/pipeline/transforms/gisfileinput/GisFileInputData.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.hop.pipeline.transforms.gisfileinput;
2 |
3 | /*
4 | * #%L
5 | * Apache Hop GIS Plugin
6 | * %%
7 | * Copyright (C) 2021 Atol CD
8 | * %%
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Lesser General Public License as
11 | * published by the Free Software Foundation, either version 3 of the
12 | * License, or (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Lesser Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Lesser Public
20 | * License along with this program. If not, see
21 | * .
22 | * #L%
23 | */
24 |
25 | import org.apache.hop.core.row.IRowMeta;
26 | import org.apache.hop.pipeline.transform.BaseTransformData;
27 |
28 | public class GisFileInputData extends BaseTransformData {
29 |
30 | public IRowMeta outputRowMeta;
31 |
32 | public GisFileInputData() {
33 | super();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/model/PipelineTreeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui.model;
17 |
18 | import javax.swing.tree.TreeNode;
19 | import org.kabeja.processing.ProcessPipeline;
20 |
21 | public class PipelineTreeNode extends AbstractProcessingTreeNode {
22 | protected ProcessPipeline pipeline;
23 |
24 | public PipelineTreeNode(TreeNode parent, ProcessPipeline pipeline, String label) {
25 | super(parent, label);
26 | this.pipeline = pipeline;
27 | }
28 |
29 | protected void initializeChildren() {}
30 |
31 | public boolean getAllowsChildren() {
32 | return false;
33 | }
34 |
35 | public boolean isLeaf() {
36 | return false;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/helpers/DXFMLineStyleElementDistanceComparator.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.dxf.helpers;
17 |
18 | import java.util.Comparator;
19 | import org.kabeja.dxf.objects.DXFMLineStyleElement;
20 |
21 | public class DXFMLineStyleElementDistanceComparator implements Comparator {
22 | public int compare(Object arg0, Object arg1) {
23 | DXFMLineStyleElement el1 = (DXFMLineStyleElement) arg0;
24 | DXFMLineStyleElement el2 = (DXFMLineStyleElement) arg1;
25 |
26 | if (el1.getOffset() > el2.getOffset()) {
27 | return 1;
28 | } else if (el1.getOffset() < el2.getOffset()) {
29 | return -1;
30 | }
31 |
32 | return 0;
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/model/SAXSerializerTreeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui.model;
17 |
18 | import javax.swing.tree.TreeNode;
19 | import org.kabeja.xml.SAXSerializer;
20 |
21 | public class SAXSerializerTreeNode extends AbstractProcessingTreeNode {
22 | protected SAXSerializer serializer;
23 |
24 | public SAXSerializerTreeNode(TreeNode parent, SAXSerializer serializer, String label) {
25 | super(parent, label);
26 | this.serializer = serializer;
27 | }
28 |
29 | protected void initializeChildren() {}
30 |
31 | public boolean getAllowsChildren() {
32 | return true;
33 | }
34 |
35 | public boolean isLeaf() {
36 | return false;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/java/com/atolcd/hop/gis/io/FileWriter.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.hop.gis.io;
2 |
3 | /*
4 | * #%L
5 | * Apache Hop GIS Plugin
6 | * %%
7 | * Copyright (C) 2021 Atol CD
8 | * %%
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Lesser General Public License as
11 | * published by the Free Software Foundation, either version 3 of the
12 | * License, or (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Lesser Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Lesser Public
20 | * License along with this program. If not, see
21 | * .
22 | * #L%
23 | */
24 |
25 | import com.atolcd.hop.gis.io.features.Feature;
26 | import com.atolcd.hop.gis.io.features.Field;
27 | import java.util.List;
28 | import org.apache.hop.core.exception.HopException;
29 |
30 | public interface FileWriter {
31 |
32 | public void setFields(List fields);
33 |
34 | public void writeFeatures(List features) throws HopException;
35 | }
36 |
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/java/com/atolcd/hop/pipeline/transforms/gisgeometryinfo/GisGeometryInfoData.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.hop.pipeline.transforms.gisgeometryinfo;
2 |
3 | /*
4 | * #%L
5 | * Apache Hop GIS Plugin
6 | * %%
7 | * Copyright (C) 2021 Atol CD
8 | * %%
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Lesser General Public License as
11 | * published by the Free Software Foundation, either version 3 of the
12 | * License, or (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Lesser Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Lesser Public
20 | * License along with this program. If not, see
21 | * .
22 | * #L%
23 | */
24 |
25 | import org.apache.hop.core.row.IRowMeta;
26 | import org.apache.hop.pipeline.transform.BaseTransformData;
27 |
28 | public class GisGeometryInfoData extends BaseTransformData {
29 |
30 | public IRowMeta outputRowMeta;
31 |
32 | public GisGeometryInfoData() {
33 | super();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/dxf/filter/DXFStreamFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser.dxf.filter;
17 |
18 | import java.util.Map;
19 | import org.kabeja.parser.dxf.DXFHandler;
20 |
21 | /**
22 | * @author Simon Mieth
23 | */
24 | public class DXF3DFaceHandler extends DXFSolidHandler {
25 | protected String ENTITY_NAME = "TRACE";
26 |
27 | public String getDXFEntityName() {
28 | return DXFConstants.ENTITY_TYPE_3DFACE;
29 | }
30 |
31 | /* (non-Javadoc)
32 | * @see de.miethxml.kabeja.parser.entities.DXFEntityHandler#startDXFEntity()
33 | */
34 | public void startDXFEntity() {
35 | solid = new DXF3DFace();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/xml/AbstractSAXFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.xml;
17 |
18 | import java.util.HashMap;
19 | import java.util.Map;
20 | import org.xml.sax.helpers.XMLFilterImpl;
21 |
22 | /**
23 | * @author Simon Mieth
24 | */
25 | public abstract class AbstractSAXFilter extends XMLFilterImpl implements SAXFilter {
26 | protected Map properties = new HashMap();
27 |
28 | /* (non-Javadoc)
29 | * @see org.kabeja.xml.SAXFilter#setProperties(java.util.Map)
30 | */
31 | public void setProperties(Map properties) {
32 | this.properties = properties;
33 | }
34 |
35 | public Map getProperties() {
36 | return this.properties;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/svg/src/main/java/com/atolcd/gis/svg/type/style/EmbeddedStyle.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.svg.type.style;
2 |
3 | import com.atolcd.gis.svg.type.AbstractStyle;
4 | import java.io.BufferedReader;
5 | import java.io.IOException;
6 | import java.io.InputStreamReader;
7 | import java.net.URL;
8 | import java.net.URLConnection;
9 |
10 | public class EmbeddedStyle extends AbstractStyle {
11 |
12 | private String css;
13 |
14 | public EmbeddedStyle(URL url) throws SvgStyleException {
15 |
16 | try {
17 |
18 | URLConnection connection = this.checkUrl(url).openConnection();
19 | BufferedReader bufferedReader =
20 | new BufferedReader(new InputStreamReader(connection.getInputStream()));
21 | StringBuilder stringBuilder = new StringBuilder();
22 | String inputLine;
23 |
24 | while ((inputLine = bufferedReader.readLine()) != null) {
25 | stringBuilder.append(inputLine);
26 | }
27 |
28 | bufferedReader.close();
29 | this.css = stringBuilder.toString();
30 |
31 | } catch (IOException e) {
32 | throw new SvgStyleException(e.getMessage());
33 | }
34 | }
35 |
36 | public EmbeddedStyle(String css) {
37 | this.css = css;
38 | }
39 |
40 | public String getCss() {
41 | return css;
42 | }
43 |
44 | public void setCss(String css) {
45 | this.css = css;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/svg/src/main/java/com/atolcd/gis/svg/type/graphic/Rectangle.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.svg.type.graphic;
2 |
3 | import com.atolcd.gis.svg.type.AbstractGraphic;
4 |
5 | public class Rectangle extends AbstractGraphic {
6 |
7 | private double x;
8 | private double y;
9 | private double width;
10 | private double height;
11 | private double xRadius;
12 | private double yRadius;
13 |
14 | public Rectangle(double x, double y, double width, double height) {
15 | this.x = x;
16 | this.y = y;
17 | this.width = width;
18 | this.height = height;
19 | this.xRadius = Double.NaN;
20 | this.yRadius = Double.NaN;
21 | }
22 |
23 | public Rectangle(
24 | double x, double y, double width, double height, double xRadius, double yRadius) {
25 | this.x = x;
26 | this.y = y;
27 | this.width = width;
28 | this.height = height;
29 | this.xRadius = xRadius;
30 | this.yRadius = yRadius;
31 | }
32 |
33 | public double getX() {
34 | return x;
35 | }
36 |
37 | public double getY() {
38 | return y;
39 | }
40 |
41 | public double getWidth() {
42 | return width;
43 | }
44 |
45 | public double getHeight() {
46 | return height;
47 | }
48 |
49 | public double getXRadius() {
50 | return xRadius;
51 | }
52 |
53 | public double getYRadius() {
54 | return yRadius;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/docs/usage/giscoordinatetransformation.adoc:
--------------------------------------------------------------------------------
1 | # Coordinate transformation
2 | Assign a coordinate system to geometry or reproject a geometry from a coordinate system to another.
3 |
4 | ## Fields
5 |
6 | **Assign coordinate system to geometry:**
7 |
8 | [width="90%", options="header"]
9 | |===
10 | |Field | Description
11 | |Name | Name of the transformation
12 | |Type | Choose `Assign coordinate system to geometry`
13 | |Geometry field | Name of the geometry column (eg: `geom`)
14 | |Output geometry | Output geometry fieldname
15 | 2+|**Input Coordinate system**
16 | |Code | Coordinate system code to assign (eg: `4326` for `WGS 84`)
17 | |===
18 |
19 | **Reproject geometry:**
20 |
21 | [width="90%", options="header"]
22 | |===
23 | |Field | Description
24 | |Name | Name of the transformation
25 | |Type | Choose `Reproject geometry`
26 | |Geometry field | Name of the geometry column (eg: `geom`)
27 | |Output geometry | Output geometry fieldname
28 | 2+|**Input Coordinate system**
29 | |EPSG auto detect | Use geometry EPSG coordinate system
30 | |Authority | `epsg`, `ignf` or `esri`)
31 | |Code | Coordinate system code before transformation (eg: `4326` for `WGS 84`)
32 | 2+|**Ouput Coordinate system**
33 | |Coordinate system authority after transformation (eg:ignf) | `epsg`, `ignf` or `esri`
34 | |Code | Coordinate system code after transformation (eg: `2154` for `RGF93`)
35 | |===
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/java/com/atolcd/hop/pipeline/transforms/giscoordinatetransformation/GisCoordinateTransformationData.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.hop.pipeline.transforms.giscoordinatetransformation;
2 |
3 | /*
4 | * #%L
5 | * Apache Hop GIS Plugin
6 | * %%
7 | * Copyright (C) 2021 Atol CD
8 | * %%
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Lesser General Public License as
11 | * published by the Free Software Foundation, either version 3 of the
12 | * License, or (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Lesser Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Lesser Public
20 | * License along with this program. If not, see
21 | * .
22 | * #L%
23 | */
24 |
25 | import org.apache.hop.core.row.IRowMeta;
26 | import org.apache.hop.pipeline.transform.BaseTransformData;
27 |
28 | public class GisCoordinateTransformationData extends BaseTransformData {
29 |
30 | public IRowMeta outputRowMeta;
31 |
32 | public GisCoordinateTransformationData() {
33 | super();
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/model/SAXFilterTreeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui.model;
17 |
18 | import javax.swing.tree.TreeNode;
19 | import org.kabeja.xml.SAXFilter;
20 |
21 | public class SAXFilterTreeNode extends AbstractProcessingTreeNode {
22 | protected SAXFilter filter;
23 | protected String label;
24 |
25 | public SAXFilterTreeNode(TreeNode parent, SAXFilter filter, String label) {
26 | super(parent, label);
27 |
28 | this.filter = filter;
29 | }
30 |
31 | protected void initializeChildren() {
32 | this.propertiesToChildren(filter.getProperties());
33 | }
34 |
35 | public boolean getAllowsChildren() {
36 | return false;
37 | }
38 |
39 | public boolean isLeaf() {
40 | return false;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/table/AbstractTableHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser.table;
17 |
18 | import org.kabeja.dxf.DXFDocument;
19 |
20 | /**
21 | * @author Simon Mieth
22 | */
23 | public abstract class AbstractTableHandler implements DXFTableHandler {
24 | protected DXFDocument doc;
25 |
26 | /* (non-Javadoc)
27 | * @see org.dxf2svg.parser.table.TableHandler#setDXFDocument(org.dxf2svg.xml.DXFDocument)
28 | */
29 | public void setDXFDocument(DXFDocument doc) {
30 | this.doc = doc;
31 | }
32 |
33 | /* (non-Javadoc)
34 | * @see de.miethxml.kabeja.parser.Handler#releaseDXFDocument()
35 | */
36 | public void releaseDXFDocument() {
37 | this.doc = null;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/xml/SAXGenerator.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2006 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.xml;
17 |
18 | import java.util.Map;
19 | import org.kabeja.dxf.DXFDocument;
20 | import org.kabeja.processing.Configurable;
21 | import org.xml.sax.ContentHandler;
22 | import org.xml.sax.SAXException;
23 |
24 | /**
25 | * This interface describes a generator component, which emit convert the DXFDocument to SAX-Event.
26 | *
27 | * Lifecycle
28 | *
29 | *
30 | * - setProperties
31 | *
- generate(DXFDocument doc,ConentHandler handler)
32 | *
33 | *
34 | * @author simon.mieth
35 | */
36 | public interface SAXGenerator extends Configurable {
37 | public void generate(DXFDocument doc, ContentHandler handler, Map context) throws SAXException;
38 | }
39 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/entities/DXFXLineHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser.entities;
17 |
18 | import org.kabeja.dxf.DXFConstants;
19 | import org.kabeja.dxf.DXFXLine;
20 |
21 | /**
22 | * @author Simon Mieth
23 | */
24 | public class DXFXLineHandler extends DXFRayHandler {
25 | /* (non-Javadoc)
26 | * @see de.miethxml.kabeja.parser.entities.DXFEntityHandler#getDXFEntityName()
27 | */
28 | public String getDXFEntityName() {
29 | return DXFConstants.ENTITY_TYPE_XLINE;
30 | }
31 |
32 | /* (non-Javadoc)
33 | * @see de.miethxml.kabeja.parser.entities.DXFEntityHandler#startDXFEntity()
34 | */
35 | public void startDXFEntity() {
36 | this.ray = new DXFXLine();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/model/PostProcessorTreeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui.model;
17 |
18 | import javax.swing.tree.TreeNode;
19 | import org.kabeja.processing.PostProcessor;
20 |
21 | public class PostProcessorTreeNode extends AbstractProcessingTreeNode {
22 | protected PostProcessor pp;
23 |
24 | public PostProcessorTreeNode(TreeNode parent, PostProcessor pp, String label) {
25 | super(parent, label);
26 | this.pp = pp;
27 | }
28 |
29 | protected void initializeChildren() {
30 | this.propertiesToChildren(this.pp.getProperties());
31 | }
32 |
33 | public boolean getAllowsChildren() {
34 | return true;
35 | }
36 |
37 | public boolean isLeaf() {
38 | return this.pp.getProperties().size() > 0;
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/java/com/atolcd/hop/pipeline/transforms/gisfileoutput/GisFileOutputData.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.hop.pipeline.transforms.gisfileoutput;
2 |
3 | /*
4 | * #%L
5 | * Apache Hop GIS Plugin
6 | * %%
7 | * Copyright (C) 2021 Atol CD
8 | * %%
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Lesser General Public License as
11 | * published by the Free Software Foundation, either version 3 of the
12 | * License, or (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Lesser Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Lesser Public
20 | * License along with this program. If not, see
21 | * .
22 | * #L%
23 | */
24 |
25 | import java.io.OutputStreamWriter;
26 | import org.apache.hop.core.row.IRowMeta;
27 | import org.apache.hop.pipeline.transform.BaseTransformData;
28 |
29 | public class GisFileOutputData extends BaseTransformData {
30 |
31 | public IRowMeta outputRowMeta;
32 |
33 | public OutputStreamWriter writer;
34 |
35 | public GisFileOutputData() {
36 | super();
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/helpers/Vector.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.dxf.helpers;
17 |
18 | /**
19 | * @author .
22 | * #L%
23 | */
24 |
25 | public class GisInputFormatParameter {
26 |
27 | private String key;
28 | private Object value;
29 |
30 | public GisInputFormatParameter(String key, Object value) {
31 | this.key = key;
32 | this.value = value;
33 | }
34 |
35 | public String getKey() {
36 | return key;
37 | }
38 |
39 | public Object getValue() {
40 | return value;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/geojson/src/main/java/org/wololo/geojson/GeoJSON.java:
--------------------------------------------------------------------------------
1 | package org.wololo.geojson;
2 |
3 | import com.fasterxml.jackson.annotation.JsonCreator;
4 | import com.fasterxml.jackson.annotation.JsonProperty;
5 | import com.fasterxml.jackson.core.JsonGenerationException;
6 | import com.fasterxml.jackson.databind.JsonMappingException;
7 | import com.fasterxml.jackson.databind.ObjectMapper;
8 | import java.io.IOException;
9 |
10 | public abstract class GeoJSON {
11 | private static final ObjectMapper mapper = new ObjectMapper();
12 |
13 | @JsonProperty("type")
14 | private String type;
15 |
16 | @JsonCreator
17 | public GeoJSON() {
18 | setType(getClass().getSimpleName());
19 | }
20 |
21 | public String toString() {
22 | try {
23 | return mapper.writeValueAsString(this);
24 | } catch (JsonGenerationException e) {
25 | return "Unhandled exception occured when serializing this instance";
26 | } catch (JsonMappingException e) {
27 | return "Unhandled exception occured when serializing this instance";
28 | } catch (IOException e) {
29 | return "Unhandled exception occured when serializing this instance";
30 | }
31 | }
32 |
33 | public String getType() {
34 | return type;
35 | }
36 |
37 | public void setType(String type) {
38 | this.type = type;
39 | }
40 |
41 | public static ObjectMapper getMapper() {
42 | return mapper;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/java/com/atolcd/hop/pipeline/transforms/gisfileoutput/GisOutputFormatParameter.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.hop.pipeline.transforms.gisfileoutput;
2 |
3 | /*
4 | * #%L
5 | * Apache Hop GIS Plugin
6 | * %%
7 | * Copyright (C) 2021 Atol CD
8 | * %%
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Lesser General Public License as
11 | * published by the Free Software Foundation, either version 3 of the
12 | * License, or (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Lesser Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Lesser Public
20 | * License along with this program. If not, see
21 | * .
22 | * #L%
23 | */
24 |
25 | public class GisOutputFormatParameter {
26 |
27 | private String key;
28 | private Object value;
29 |
30 | public GisOutputFormatParameter(String key, Object value) {
31 | this.key = key;
32 | this.value = value;
33 | }
34 |
35 | public String getKey() {
36 | return key;
37 | }
38 |
39 | public Object getValue() {
40 | return value;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/objects/DXFMLineStyleElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.dxf.objects;
17 |
18 | public class DXFMLineStyleElement {
19 | protected int lineColor = 0;
20 | protected String lineType = "BYLAYER";
21 | protected double offset;
22 |
23 | public int getLineColor() {
24 | return lineColor;
25 | }
26 |
27 | public void setLineColor(int lineColor) {
28 | this.lineColor = lineColor;
29 | }
30 |
31 | public String getLineType() {
32 | return lineType;
33 | }
34 |
35 | public void setLineType(String lineStyle) {
36 | this.lineType = lineStyle;
37 | }
38 |
39 | public double getOffset() {
40 | return offset;
41 | }
42 |
43 | public void setOffset(double offset) {
44 | this.offset = offset;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/processing/PostProcessor.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.processing;
17 |
18 | import java.util.Map;
19 | import org.kabeja.dxf.DXFDocument;
20 |
21 | /**
22 | * This interface describes a PostPorcessor, which will work direct with parsed CAD data.
23 | *
24 | * Lifecycle
25 | *
26 | *
27 | * - setProperties()
28 | *
- process()
29 | *
30 | *
31 | * @author Simon Mieth
32 | */
33 | public interface PostProcessor extends Configurable {
34 | /**
35 | * Postprocess the given DXFDocument
36 | *
37 | * @param doc
38 | * @param context
39 | * @throws ProcessorException
40 | */
41 | public void process(DXFDocument doc, Map context) throws ProcessorException;
42 | }
43 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/DXFSectionHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser;
17 |
18 | import org.kabeja.dxf.DXFDocument;
19 | import org.kabeja.parser.dxf.DXFHandler;
20 |
21 | /**
22 | * This interface descripe a Section Handler, which should handle a SECTION block.
23 | *
24 | * Lifecycle
25 | *
26 | *
27 | * - setDXFDocument
28 | *
- startSection
29 | *
- parseGroup (multiple)
30 | *
- endSection
31 | *
32 | * @author
15 | *
- 0 Null Shape
16 | *
- 1 Point
17 | *
- 3 PolyLine
18 | *
- 5 Polygon
19 | *
- 8 MultiPoint
20 | *
- 11 PointZ
21 | *
- 13 PolyLineZ
22 | *
- 15 PolygonZ
23 | *
- 18 MultiPointZ
24 | *
- 21 PointM
25 | *
- 23 PolyLineM
26 | *
- 25 PolygonM
27 | *
- 28 MultiPointM
28 | *
- 31 MultiPatch
29 | *
30 | */
31 | public int getShapeType();
32 |
33 | public Geometry read(
34 | EndianDataInputStream file, GeometryFactory geometryFactory, int contentLength)
35 | throws IOException, InvalidShapefileException;
36 |
37 | public void write(Geometry geometry, EndianDataOutputStream file) throws IOException;
38 |
39 | public int getLength(Geometry geometry); // length in 16bit words
40 |
41 | /** Return a empty geometry. */
42 | public Geometry getEmptyGeometry(GeometryFactory factory);
43 | }
44 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/objects/DXFImageDefObject.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.dxf.objects;
17 |
18 | import org.kabeja.dxf.DXFConstants;
19 |
20 | /**
21 | * @author Simon Mieth
23 | */
24 | public class DXFBodyHandler extends DXFRegionHandler {
25 | /*
26 | * (non-Javadoc)
27 | *
28 | * @see de.miethxml.kabeja.parser.entities.AbstractEntityHandler#getDXFEntityName()
29 | */
30 | public String getDXFEntityName() {
31 | // TODO Auto-generated method stub
32 | return DXFConstants.ENTITY_TYPE_BODY;
33 | }
34 |
35 | /*
36 | * (non-Javadoc)
37 | *
38 | * @see de.miethxml.kabeja.parser.entities.DXFEntityHandler#startDXFEntity()
39 | */
40 | public void startDXFEntity() {
41 | region = new DXFBody();
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/model/ParsersTreeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui.model;
17 |
18 | import java.util.Iterator;
19 | import javax.swing.tree.TreeNode;
20 | import org.kabeja.parser.Parser;
21 |
22 | public class ParsersTreeNode extends AbstractProcessingTreeNode {
23 | public static String LABEL = "Parsers";
24 |
25 | public ParsersTreeNode(TreeNode parent) {
26 | super(parent, LABEL);
27 | }
28 |
29 | public boolean getAllowsChildren() {
30 | return true;
31 | }
32 |
33 | public boolean isLeaf() {
34 | return false;
35 | }
36 |
37 | protected void initializeChildren() {
38 | Iterator i = this.manager.getParsers().iterator();
39 |
40 | while (i.hasNext()) {
41 | ParserTreeNode ptn = new ParserTreeNode(this, (Parser) i.next());
42 | this.addChild(ptn);
43 | }
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/entities/DXF3DSolidHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser.entities;
17 |
18 | import org.kabeja.dxf.DXF3DSolid;
19 | import org.kabeja.dxf.DXFConstants;
20 |
21 | /**
22 | * @author Simon Mieth
23 | */
24 | public class DXF3DSolidHandler extends DXFRegionHandler {
25 | /*
26 | * (non-Javadoc)
27 | *
28 | * @see de.miethxml.kabeja.parser.entities.AbstractEntityHandler#getDXFEntityName()
29 | */
30 | public String getDXFEntityName() {
31 | // TODO Auto-generated method stub
32 | return DXFConstants.ENTITY_TYPE_3DSOLID;
33 | }
34 |
35 | /*
36 | * (non-Javadoc)
37 | *
38 | * @see de.miethxml.kabeja.parser.entities.DXFEntityHandler#startDXFEntity()
39 | */
40 | public void startDXFEntity() {
41 | region = new DXF3DSolid();
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/java/com/atolcd/hop/gis/io/FileReader.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.hop.gis.io;
2 |
3 | /*
4 | * #%L
5 | * Apache Hop GIS Plugin
6 | * %%
7 | * Copyright (C) 2021 Atol CD
8 | * %%
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Lesser General Public License as
11 | * published by the Free Software Foundation, either version 3 of the
12 | * License, or (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Lesser Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Lesser Public
20 | * License along with this program. If not, see
21 | * .
22 | * #L%
23 | */
24 |
25 | import com.atolcd.hop.gis.io.features.Feature;
26 | import com.atolcd.hop.gis.io.features.Field;
27 | import java.util.List;
28 | import org.apache.hop.core.exception.HopException;
29 |
30 | public interface FileReader {
31 |
32 | public void setLimit(long limit);
33 |
34 | public void setForceToMultiGeometry(boolean forceToMultiGeometry);
35 |
36 | public void setForceTo2DGeometry(boolean forceTo2DGeometry);
37 |
38 | public List getFields();
39 |
40 | public List getFeatures() throws HopException;
41 | }
42 |
--------------------------------------------------------------------------------
/hop-gis-plugins/src/main/java/com/atolcd/hop/gis/io/features/Value.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.hop.gis.io.features;
2 |
3 | /*
4 | * #%L
5 | * Apache Hop GIS Plugin
6 | * %%
7 | * Copyright (C) 2021 Atol CD
8 | * %%
9 | * This program is free software: you can redistribute it and/or modify
10 | * it under the terms of the GNU Lesser General Public License as
11 | * published by the Free Software Foundation, either version 3 of the
12 | * License, or (at your option) any later version.
13 | *
14 | * This program is distributed in the hope that it will be useful,
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | * GNU General Lesser Public License for more details.
18 | *
19 | * You should have received a copy of the GNU General Lesser Public
20 | * License along with this program. If not, see
21 | * .
22 | * #L%
23 | */
24 |
25 | public class Value {
26 |
27 | private Field field;
28 | private Object value;
29 |
30 | public Value(Field field, Object value) {
31 | this.field = field;
32 | this.value = value;
33 | }
34 |
35 | public Field getField() {
36 | return field;
37 | }
38 |
39 | public void setField(Field field) {
40 | this.field = field;
41 | }
42 |
43 | public Object getValue() {
44 | return value;
45 | }
46 |
47 | public void setValue(Object value) {
48 | this.value = value;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/model/SAXFiltersTreeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui.model;
17 |
18 | import java.util.Iterator;
19 | import javax.swing.tree.TreeNode;
20 |
21 | public class SAXFiltersTreeNode extends AbstractProcessingTreeNode {
22 | protected static final String LABEL = "SAXFilters";
23 |
24 | public SAXFiltersTreeNode(TreeNode parent) {
25 | super(parent, LABEL);
26 | }
27 |
28 | protected void initializeChildren() {
29 | Iterator i = this.manager.getSAXFilters().keySet().iterator();
30 |
31 | while (i.hasNext()) {
32 | String key = (String) i.next();
33 | this.addChild(new SAXFilterTreeNode(this, this.manager.getSAXFilter(key), key));
34 | }
35 | }
36 |
37 | public boolean getAllowsChildren() {
38 | return true;
39 | }
40 |
41 | public boolean isLeaf() {
42 | return false;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/xml/SAXSerializer.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.xml;
17 |
18 | import java.io.OutputStream;
19 | import org.kabeja.processing.Configurable;
20 | import org.xml.sax.ContentHandler;
21 |
22 | /**
23 | * This interface describes a Serializer, which will serialize the SAX-Events to the given stream.
24 | *
25 | *
Lifecycle
26 | *
27 | *
28 | * - setProperties
29 | *
- getSuffix()
30 | *
- getMimeType()
31 | *
- setOutput()
32 | *
- startDocument and all other methods from org.xml.sax.ContentHandler
33 | *
34 | *
35 | * @author Simon Mieth
36 | */
37 | public interface SAXSerializer extends ContentHandler, Configurable {
38 | public String getSuffix();
39 |
40 | public String getMimeType();
41 |
42 | public void setOutput(OutputStream out);
43 | }
44 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/model/PropertyTreeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui.model;
17 |
18 | import java.util.Map;
19 | import javax.swing.tree.TreeNode;
20 |
21 | public class PropertyTreeNode extends AbstractProcessingTreeNode {
22 | protected Map properties;
23 | protected String propertyKey;
24 |
25 | public PropertyTreeNode(TreeNode parent, Map properties, String propertyKey) {
26 | super(parent, propertyKey + "=" + properties.get(propertyKey));
27 |
28 | this.properties = properties;
29 | this.propertyKey = propertyKey;
30 | }
31 |
32 | protected String getLabel() {
33 | return this.propertyKey + "=" + this.properties.get(this.propertyKey);
34 | }
35 |
36 | protected void initializeChildren() {}
37 |
38 | public boolean getAllowsChildren() {
39 | return false;
40 | }
41 |
42 | public boolean isLeaf() {
43 | return true;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/helpers/DXFMLineSegmentElement.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.dxf.helpers;
17 |
18 | public class DXFMLineSegmentElement {
19 | protected double[] lengthParameters;
20 | protected double[] fillParameters;
21 |
22 | public double[] getLengthParameters() {
23 | return lengthParameters;
24 | }
25 |
26 | public void setLengthParameters(double[] lengthParameters) {
27 | this.lengthParameters = lengthParameters;
28 | }
29 |
30 | public void setLengthParameter(int index, double v) {
31 | this.lengthParameters[index] = v;
32 | }
33 |
34 | public double[] getFillParameters() {
35 | return fillParameters;
36 | }
37 |
38 | public void setFillParameters(double[] fillParameters) {
39 | this.fillParameters = fillParameters;
40 | }
41 |
42 | public void setFillParameter(int index, double v) {
43 | this.fillParameters[index] = v;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/model/PipelinesTreeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui.model;
17 |
18 | import java.util.Iterator;
19 | import javax.swing.tree.TreeNode;
20 |
21 | public class PipelinesTreeNode extends AbstractProcessingTreeNode {
22 | public static final String LABEL = "Pipelines";
23 |
24 | public PipelinesTreeNode(TreeNode parent) {
25 | super(parent, LABEL);
26 | }
27 |
28 | protected void initializeChildren() {
29 | Iterator i = this.manager.getProcessPipelines().keySet().iterator();
30 |
31 | while (i.hasNext()) {
32 | String key = (String) i.next();
33 | PipelineTreeNode node = new PipelineTreeNode(this, this.manager.getProcessPipeline(key), key);
34 | this.addChild(node);
35 | }
36 | }
37 |
38 | public boolean getAllowsChildren() {
39 | return false;
40 | }
41 |
42 | public boolean isLeaf() {
43 | return false;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/tools/SAXSerializerConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.tools;
17 |
18 | import java.util.HashMap;
19 | import java.util.Map;
20 |
21 | /**
22 | * @author Simon Mieth
23 | */
24 | public class SAXSerializerConfig {
25 | private Map properties = new HashMap();
26 | private String saxSerializerName;
27 |
28 | public Map getProperties() {
29 | return this.properties;
30 | }
31 |
32 | public void addProperty(String name, String value) {
33 | this.properties.put(name, value);
34 | }
35 |
36 | /**
37 | * @return Returns the filterName.
38 | */
39 | public String getSAXSerializerName() {
40 | return saxSerializerName;
41 | }
42 |
43 | /**
44 | * @param filterName The filterName to set.
45 | */
46 | public void setSAXSerializerName(String filterName) {
47 | this.saxSerializerName = filterName;
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/PropertiesEditor.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | import java.util.Map;
19 |
20 | /**
21 | * A Properties Editor edits processing properties.
22 | *
23 | * @author Simon Mieth
24 | */
25 | public interface PropertiesEditor {
26 | public static final String SERVICE = PropertiesEditor.class.getName();
27 |
28 | /**
29 | * Set the properties to edit.
30 | *
31 | * @param properties
32 | */
33 | public void setProperties(Map properties);
34 |
35 | /**
36 | * Returns the changed properties or properties provided by the properties editor.
37 | *
38 | * @return
39 | */
40 | public Map getProperties();
41 |
42 | /**
43 | * @param listener
44 | */
45 | public void addPropertiesListener(PropertiesListener listener);
46 |
47 | public void removePropertiesListener(PropertiesListener listener);
48 | }
49 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/model/PropertiesTreeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui.model;
17 |
18 | import java.util.Iterator;
19 | import java.util.Map;
20 | import javax.swing.tree.TreeNode;
21 |
22 | public class PropertiesTreeNode extends AbstractProcessingTreeNode {
23 | protected static final String LABEL = "Properties";
24 | protected Map properties;
25 |
26 | public PropertiesTreeNode(TreeNode parent, Map properties) {
27 | super(parent, LABEL);
28 | this.properties = properties;
29 | }
30 |
31 | protected void initializeChildren() {
32 | Iterator i = this.properties.keySet().iterator();
33 |
34 | while (i.hasNext()) {
35 | this.addChild(new PropertyTreeNode(this, properties, (String) i.next()));
36 | }
37 | }
38 |
39 | public boolean getAllowsChildren() {
40 | return false;
41 | }
42 |
43 | public boolean isLeaf() {
44 | return false;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/DXFDocumentViewComponent.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | import javax.swing.JComponent;
19 | import org.kabeja.dxf.DXFDocument;
20 |
21 | /**
22 | * A DXFDocumentViewComponent provides a view of the current DXFDocument.
23 | *
24 | * @author Simon Mieth
25 | */
26 | public interface DXFDocumentViewComponent extends Component {
27 | public static final String SERVICE = DXFDocumentViewComponent.class.getName();
28 |
29 | /**
30 | * @return the title of the component
31 | */
32 | abstract String getTitle();
33 |
34 | /**
35 | * @return the view of this component
36 | */
37 | abstract JComponent getView();
38 |
39 | /**
40 | * Show the DXFDocument in the view of this component
41 | *
42 | * @param doc
43 | * @throws UIException
44 | */
45 | abstract void showDXFDocument(DXFDocument doc) throws UIException;
46 | }
47 |
--------------------------------------------------------------------------------
/svg/src/main/java/com/atolcd/gis/svg/type/Document.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.svg.type;
2 |
3 | public class Document extends AbstractContainer {
4 |
5 | public static String SVG_UNIT_CM = "cm";
6 | public static String SVG_UNIT_FT = "ft";
7 | public static String SVG_UNIT_IN = "in";
8 | public static String SVG_UNIT_M = "m";
9 | public static String SVG_UNIT_MM = "mm";
10 | public static String SVG_UNIT_PC = "pc";
11 | public static String SVG_UNIT_PT = "pt";
12 | public static String SVG_UNIT_PX = "px";
13 |
14 | public static String SVG_VERSION_1_1 = "1.1";
15 | public static String SVG_VERSION_1_2 = "1.2";
16 |
17 | private double height;
18 | private double width;
19 | private String units;
20 | private AbstractStyle style;
21 |
22 | public Document() {
23 | this.height = 0;
24 | this.width = 0;
25 | this.units = Document.SVG_UNIT_PX;
26 | this.style = null;
27 | }
28 |
29 | public double getHeight() {
30 | return height;
31 | }
32 |
33 | public void setHeight(double height) {
34 | this.height = height;
35 | }
36 |
37 | public double getWidth() {
38 | return width;
39 | }
40 |
41 | public void setWidth(double width) {
42 | this.width = width;
43 | }
44 |
45 | public String getUnits() {
46 | return units;
47 | }
48 |
49 | public void setUnits(String units) {
50 | this.units = units;
51 | }
52 |
53 | public AbstractStyle getStyle() {
54 | return style;
55 | }
56 |
57 | public void setStyle(AbstractStyle style) {
58 | this.style = style;
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/io/StreamGenerator.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2006 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.io;
17 |
18 | import java.io.OutputStream;
19 | import java.util.Map;
20 | import org.kabeja.dxf.DXFDocument;
21 |
22 | /**
23 | * This interface describes a Generator, which will generate output the given stream.
24 | *
25 | * Lifecycle
26 | *
27 | *
28 | * - setProperties
29 | *
- getSuffix()
30 | *
- getMimeType()
31 | *
- generate()
32 | *
33 | *
34 | * @author Simon Mieth
35 | */
36 | public interface StreamGenerator {
37 | public void setProperties(Map properties);
38 |
39 | public String getSuffix();
40 |
41 | public String getMimeType();
42 |
43 | /**
44 | * Output the generation result to the given stream.
45 | *
46 | * @param doc the @see DXFDocument to output
47 | * @param out
48 | */
49 | public void generate(DXFDocument doc, OutputStream out);
50 | }
51 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/model/PostProcessorsTreeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui.model;
17 |
18 | import java.util.Iterator;
19 | import javax.swing.tree.TreeNode;
20 |
21 | public class PostProcessorsTreeNode extends AbstractProcessingTreeNode {
22 | public static final String LABEL = "PostProcessors";
23 |
24 | public PostProcessorsTreeNode(TreeNode parent) {
25 | super(parent, LABEL);
26 | }
27 |
28 | protected void initializeChildren() {
29 | Iterator i = this.manager.getPostProcessors().keySet().iterator();
30 |
31 | while (i.hasNext()) {
32 | String key = (String) i.next();
33 | PostProcessorTreeNode node =
34 | new PostProcessorTreeNode(this, this.manager.getPostProcessor(key), key);
35 | this.addChild(node);
36 | }
37 | }
38 |
39 | public boolean getAllowsChildren() {
40 | return true;
41 | }
42 |
43 | public boolean isLeaf() {
44 | return false;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/model/SAXGeneratorsTreeNode.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui.model;
17 |
18 | import java.util.Iterator;
19 | import javax.swing.tree.TreeNode;
20 |
21 | public class SAXGeneratorsTreeNode extends AbstractProcessingTreeNode {
22 | protected static final String LABEL = "SAXSerializers";
23 |
24 | public SAXGeneratorsTreeNode(TreeNode parent) {
25 | super(parent, LABEL);
26 | }
27 |
28 | protected void initializeChildren() {
29 | Iterator i = this.manager.getSAXGenerators().keySet().iterator();
30 |
31 | while (i.hasNext()) {
32 | String key = (String) i.next();
33 | SAXGeneratorTreeNode node =
34 | new SAXGeneratorTreeNode(this, this.manager.getSAXGenerator(key), key);
35 | this.addChild(node);
36 | }
37 | }
38 |
39 | public boolean getAllowsChildren() {
40 | return true;
41 | }
42 |
43 | public boolean isLeaf() {
44 | return false;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/svg/src/main/java/com/atolcd/gis/svg/type/AbstractElement.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.svg.type;
2 |
3 | public abstract class AbstractElement implements IElement {
4 |
5 | private String id;
6 | private String title;
7 | private String description;
8 | private String svgStyle;
9 | private String cssClass;
10 | private String transform;
11 |
12 | public AbstractElement() {
13 | this.id = null;
14 | this.title = null;
15 | this.description = null;
16 | this.svgStyle = null;
17 | this.cssClass = null;
18 | this.transform = null;
19 | }
20 |
21 | public String getId() {
22 | return id;
23 | }
24 |
25 | public void setId(String id) {
26 | this.id = id;
27 | }
28 |
29 | public String getTitle() {
30 | return title;
31 | }
32 |
33 | public void setTitle(String title) {
34 | this.title = title;
35 | }
36 |
37 | public String getDescription() {
38 | return description;
39 | }
40 |
41 | public void setDescription(String description) {
42 | this.description = description;
43 | }
44 |
45 | public String getSvgStyle() {
46 | return svgStyle;
47 | }
48 |
49 | public void setSvgStyle(String svgStyle) {
50 | this.svgStyle = svgStyle;
51 | }
52 |
53 | public String getCssClass() {
54 | return cssClass;
55 | }
56 |
57 | public void setCssClass(String cssClass) {
58 | this.cssClass = cssClass;
59 | }
60 |
61 | public String getTransform() {
62 | return transform;
63 | }
64 |
65 | public void setTransform(String transform) {
66 | this.transform = transform;
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/ui/ApplicationMenuBar.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.ui;
17 |
18 | import javax.swing.Action;
19 | import javax.swing.JMenu;
20 | import javax.swing.JMenuItem;
21 |
22 | /**
23 | * Appliction menubar service provides access to the applications menubar.
24 | *
25 | * @author Simon Mieth
26 | */
27 | public interface ApplicationMenuBar {
28 | public static final String SERVICE = ApplicationMenuBar.class.getName();
29 | public static final String MENU_ID_FILE = "menu.file";
30 | public static final String MENU_ID_VIEW = "menu.view";
31 | public static final String MENU_ID_EDIT = "menu.edit";
32 | public static final String MENU_ID_HELP = "menu.help";
33 |
34 | public void setMenu(String menuID, JMenu menu);
35 |
36 | public boolean hasMenu(String id);
37 |
38 | public void setAction(String menuID, Action action);
39 |
40 | public void setJMenuItem(String menuID, JMenuItem item);
41 | }
42 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/dxf/filter/FilterExample.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2008 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser.dxf.filter;
17 |
18 | import java.util.HashMap;
19 | import java.util.Map;
20 | import org.kabeja.dxf.DXFDocument;
21 | import org.kabeja.parser.DXFParser;
22 | import org.kabeja.parser.ParserBuilder;
23 |
24 | public class FilterExample {
25 | /**
26 | * @param args
27 | */
28 | public static void main(String[] args) {
29 | try {
30 | DXFParser parser = (DXFParser) ParserBuilder.createDefaultParser();
31 |
32 | // test
33 | DXFStreamFilter filter = new DXFStreamLayerFilter();
34 | Map p = new HashMap();
35 | p.put("layers.include", args[0]);
36 | filter.setProperties(p);
37 | parser.addDXFStreamFilter(filter);
38 | parser.parse(args[1]);
39 |
40 | DXFDocument doc = parser.getDocument();
41 |
42 | // do something with the doc
43 | } catch (Exception e) {
44 | e.printStackTrace();
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/helpers/Edge.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.dxf.helpers;
17 |
18 | /**
19 | * @author Simon Mieth
23 | */
24 | public class SAXFilterConfig {
25 | private Map properties;
26 | private String filterName;
27 |
28 | public SAXFilterConfig(Map properties) {
29 | this.properties = properties;
30 | }
31 |
32 | public SAXFilterConfig() {
33 | this(new HashMap());
34 | }
35 |
36 | public Map getProperties() {
37 | return this.properties;
38 | }
39 |
40 | public void addProperty(String name, String value) {
41 | this.properties.put(name, value);
42 | }
43 |
44 | /**
45 | * @return Returns the filterName.
46 | */
47 | public String getFilterName() {
48 | return filterName;
49 | }
50 |
51 | /**
52 | * @param filterName The filterName to set.
53 | */
54 | public void setFilterName(String filterName) {
55 | this.filterName = filterName;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/xml/AbstractSAXGenerator.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.xml;
17 |
18 | import java.util.Map;
19 | import org.kabeja.dxf.DXFDocument;
20 | import org.kabeja.processing.AbstractConfigurable;
21 | import org.xml.sax.ContentHandler;
22 | import org.xml.sax.SAXException;
23 |
24 | public abstract class AbstractSAXGenerator extends AbstractConfigurable implements SAXGenerator {
25 | protected DXFDocument doc;
26 | protected ContentHandler handler;
27 | protected Map context;
28 |
29 | public void generate(DXFDocument doc, ContentHandler handler, Map context) throws SAXException {
30 | this.doc = doc;
31 | this.handler = handler;
32 | this.context = context;
33 | this.generate();
34 | }
35 |
36 | /**
37 | * This method has to be overwritten by any subclass. At this point the XMLGenerator is setup
38 | * (properties, ContentHandler and DXFDocument) and should emit the XML content to the
39 | * ContentHandler.
40 | */
41 | protected abstract void generate() throws SAXException;
42 | }
43 |
--------------------------------------------------------------------------------
/spatialite/src/main/java/org/sqlite/spatialite/io/ByteOrderDataOutputStream.java:
--------------------------------------------------------------------------------
1 | package org.sqlite.spatialite.io;
2 |
3 | import java.io.IOException;
4 | import java.io.OutputStream;
5 | import java.nio.ByteOrder;
6 | import org.locationtech.jts.io.ByteOrderValues;
7 |
8 | public class ByteOrderDataOutputStream extends OutputStream {
9 |
10 | private final OutputStream delegate;
11 | private final int byteOrder;
12 |
13 | private byte[] buf1 = new byte[1];
14 | private byte[] buf4 = new byte[4];
15 | private byte[] buf8 = new byte[8];
16 |
17 | public ByteOrderDataOutputStream(OutputStream os, ByteOrder byteOrder) {
18 | this.delegate = os;
19 | if (byteOrder.equals(ByteOrder.BIG_ENDIAN)) {
20 | this.byteOrder = ByteOrderValues.BIG_ENDIAN;
21 | } else {
22 | this.byteOrder = ByteOrderValues.LITTLE_ENDIAN;
23 | }
24 | }
25 |
26 | @Override
27 | public void close() throws IOException {
28 | delegate.close();
29 | }
30 |
31 | @Override
32 | public void flush() throws IOException {
33 | delegate.flush();
34 | }
35 |
36 | public void writeByte(byte b) throws IOException {
37 | buf1[0] = b;
38 | delegate.write(buf1);
39 | }
40 |
41 | @Override
42 | public void write(int b) throws IOException {
43 |
44 | ByteOrderValues.putInt(b, buf4, byteOrder);
45 | delegate.write(buf4);
46 | }
47 |
48 | public void writeDouble(double d) throws IOException {
49 |
50 | ByteOrderValues.putDouble(d, buf8, byteOrder);
51 | delegate.write(buf8);
52 | }
53 |
54 | public void writeFloat(float f) throws IOException {
55 |
56 | int b = Float.floatToIntBits(f);
57 | write(b);
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/.github/pull_request_template.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | 🤸 Please for non-trivial changes, fill a [GitHub issue](https://github.com/atolcd/hop-gis-plugins/issues) and set the PR title like `Issues #XXX, #YYY, #ZZZ`. Trivial changes are typo, documentation, example...
4 |
5 | # ☑ Checklist
6 |
7 | - [ ] I've compiled and checked the changes with `mvn clean verify`
8 | - [ ] I tested my changes and added relevant example if possible
9 | - [ ] I updated documentation if needed
10 | - [ ] Each commit has a meaningful subject line and body
11 | - [ ] The pull request addresses just the described changes
12 | - [ ] I assume that the licenses are respected
13 | - [ ] I self-reviewed my own code
14 |
15 | # 𝌡 Proposed changes
16 |
17 | Please explain your changes here so that anyone can understand what it does, how, and why.
18 |
19 | Fixes:
20 |
21 | - #XXX
22 | - #YYY
23 |
24 | Types of changes:
25 |
26 | - [ ] Bugfix
27 | - [ ] Feature
28 | - [ ] Code style update (formatting, renaming)
29 | - [ ] Refactoring (no functional changes, no api changes)
30 | - [ ] Build related changes
31 | - [ ] Documentation content changes
32 | - [ ] Other (please describe):
33 |
34 | GIS Transforms concerned:
35 |
36 | - [ ] Coordinate system operation
37 | - [ ] GIS File input
38 | - [ ] GIS File output
39 | - [ ] Geometry information
40 | - [ ] Geoprocessing
41 | - [ ] Geospatial Group by
42 | - [ ] Spatial relationship and proximity
43 |
44 | # 🏭 How to test the changes?
45 |
46 | Please describe how you tested the changes so that we can we can reproduce.
47 |
48 | For example, you can add a transformation or a pipeline in the `examples` directory and the datasets or how to get them.
49 |
50 | **🙏 Thank you! 🙏**
51 |
--------------------------------------------------------------------------------
/gpx/src/main/java/com/atolcd/gis/gpx/type/Author.java:
--------------------------------------------------------------------------------
1 | package com.atolcd.gis.gpx.type;
2 |
3 | import java.util.regex.Matcher;
4 | import java.util.regex.Pattern;
5 |
6 | public class Author {
7 |
8 | private String name;
9 | private String email;
10 |
11 | public Author(String name, String email) throws AuthorException {
12 | this.name = name;
13 | this.email = checkEmail(email);
14 | }
15 |
16 | public String getName() {
17 | return name;
18 | }
19 |
20 | public void setName(String name) {
21 | this.name = name;
22 | }
23 |
24 | public String getEmail() {
25 | return email;
26 | }
27 |
28 | public void setEmail(String email) throws AuthorException {
29 | this.email = checkEmail(email);
30 | }
31 |
32 | public String getEmailId() {
33 |
34 | if (this.email != null) {
35 | return this.email.split("@")[0];
36 | } else {
37 | return null;
38 | }
39 | }
40 |
41 | public String getEmailDomain() {
42 |
43 | if (this.email != null) {
44 | return this.email.split("@")[1];
45 | } else {
46 | return null;
47 | }
48 | }
49 |
50 | private String checkEmail(String email) throws AuthorException {
51 |
52 | if (email != null) {
53 |
54 | Pattern pattern = Pattern.compile("^.+@.+\\..+$");
55 | Matcher matcher = pattern.matcher(email);
56 | if (!matcher.matches()) {
57 | throw new AuthorException("Wrong author mail address");
58 | }
59 | }
60 |
61 | return email;
62 | }
63 |
64 | @SuppressWarnings("serial")
65 | public class AuthorException extends Exception {
66 |
67 | public AuthorException(String message) {
68 | super(message);
69 | }
70 | }
71 | }
72 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/processing/PostProcessorConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.processing;
17 |
18 | import java.util.HashMap;
19 | import java.util.Map;
20 |
21 | /**
22 | * @author Simon Mieth
23 | */
24 | public class PostProcessorConfig {
25 | private Map properties = new HashMap();
26 | private String postProcessorName;
27 |
28 | public PostProcessorConfig(Map properties) {
29 | this.properties = properties;
30 | }
31 |
32 | public PostProcessorConfig() {
33 | this(new HashMap());
34 | }
35 |
36 | public Map getProperties() {
37 | return this.properties;
38 | }
39 |
40 | public void addProperty(String name, String value) {
41 | this.properties.put(name, value);
42 | }
43 |
44 | /**
45 | * @return Returns the filterName.
46 | */
47 | public String getPostProcessorName() {
48 | return postProcessorName;
49 | }
50 |
51 | /**
52 | * @param filterName The filterName to set.
53 | */
54 | public void setPostProcessorName(String filterName) {
55 | this.postProcessorName = filterName;
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/DXFRegion.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.dxf;
17 |
18 | import java.util.ArrayList;
19 | import java.util.List;
20 |
21 | /**
22 | * @author 0)) {
47 | return true;
48 | }
49 |
50 | return false;
51 | }
52 |
53 | /**
54 | * Returns the global linetype scale factor.
55 | *
56 | * @return the global scalefactor
57 | */
58 | public double getLinetypeScale() {
59 | double gscale = 1.0;
60 |
61 | if (hasVariable("$LTSCALE")) {
62 | gscale = getVariable("$LTSCALE").getDoubleValue("40");
63 | }
64 |
65 | return gscale;
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/DXFLine.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.dxf;
17 |
18 | import org.kabeja.dxf.helpers.Point;
19 | import org.kabeja.math.MathUtils;
20 |
21 | /**
22 | * @author elements = new ArrayList();
26 |
27 | public Point getStartPoint() {
28 | return startPoint;
29 | }
30 |
31 | public void setStartPoint(Point startPoint) {
32 | this.startPoint = startPoint;
33 | }
34 |
35 | public Vector getDirection() {
36 | return direction;
37 | }
38 |
39 | public void setDirection(Vector direction) {
40 | this.direction = direction;
41 | }
42 |
43 | public Vector getMiterDirection() {
44 | return miterDirection;
45 | }
46 |
47 | public void setMiterDirection(Vector miterDirection) {
48 | this.miterDirection = miterDirection;
49 | }
50 |
51 | public void addDXFMLineSegmentElement(DXFMLineSegmentElement el) {
52 | this.elements.add(el);
53 | }
54 |
55 | public int getDXFMLineSegmentElementCount() {
56 | return this.elements.size();
57 | }
58 |
59 | public DXFMLineSegmentElement getDXFMLineSegmentElement(int index) {
60 | return (DXFMLineSegmentElement) this.elements.get(index);
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/processing/PostProcessManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.processing;
17 |
18 | import java.util.ArrayList;
19 | import java.util.Iterator;
20 | import java.util.Map;
21 | import org.kabeja.dxf.DXFDocument;
22 |
23 | /**
24 | * @author Simon Mieth
25 | */
26 | public class PostProcessManager {
27 | private ArrayList processors = new ArrayList();
28 |
29 | public void addPostProcessor(PostProcessor pp) {
30 | processors.add(pp);
31 | }
32 |
33 | public void addPostProcessor(String classname) {
34 | try {
35 | PostProcessor pp =
36 | (PostProcessor) this.getClass().getClassLoader().loadClass(classname).newInstance();
37 | addPostProcessor(pp);
38 | } catch (InstantiationException e) {
39 | // TODO Auto-generated catch block
40 | e.printStackTrace();
41 | } catch (IllegalAccessException e) {
42 | // TODO Auto-generated catch block
43 | e.printStackTrace();
44 | } catch (ClassNotFoundException e) {
45 | // TODO Auto-generated catch block
46 | e.printStackTrace();
47 | }
48 | }
49 |
50 | public void process(DXFDocument doc, Map context) throws ProcessorException {
51 | Iterator i = processors.iterator();
52 |
53 | while (i.hasNext()) {
54 | PostProcessor pp = (PostProcessor) i.next();
55 | pp.process(doc, context);
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/parser/entities/DXFAttribHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.parser.entities;
17 |
18 | import org.kabeja.dxf.DXFAttrib;
19 | import org.kabeja.dxf.DXFConstants;
20 | import org.kabeja.parser.DXFValue;
21 |
22 | /**
23 | * @author Simon Mieth
24 | */
25 | public class DXFAttribHandler extends DXFTextHandler {
26 | public static final int ATTRIB_VERTICAL_ALIGN = 74;
27 | public static final int ATTRIB_TEXT_LENGTH = 73;
28 |
29 | public DXFAttribHandler() {
30 | super();
31 | }
32 |
33 | /* (non-Javadoc)
34 | * @see de.miethxml.kabeja.parser.entities.DXFEntityHandler#parseGroup(int, de.miethxml.kabeja.parser.DXFValue)
35 | */
36 | public void parseGroup(int groupCode, DXFValue value) {
37 |
38 | switch (groupCode) {
39 | case ATTRIB_TEXT_LENGTH:
40 |
41 | // ignore not used by
42 | break;
43 |
44 | case ATTRIB_VERTICAL_ALIGN:
45 | text.setValign(value.getIntegerValue());
46 |
47 | break;
48 |
49 | default:
50 | super.parseGroup(groupCode, value);
51 | }
52 | }
53 |
54 | public void startDXFEntity() {
55 | text = new DXFAttrib();
56 | }
57 |
58 | /* (non-Javadoc)
59 | * @see de.miethxml.kabeja.parser.entities.DXFEntityHandler#getDXFEntityName()
60 | */
61 | public String getDXFEntityName() {
62 | return DXFConstants.ENTITY_TYPE_ATTRIB;
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/dxf/helpers/SplinePoint.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.dxf.helpers;
17 |
18 | /**
19 | * @author extendedData;
25 |
26 | public Entity(String id, Geometry geometry, String type, String text) {
27 | this.id = id;
28 | this.geometry = geometry;
29 | this.type = type;
30 | this.text = text;
31 | this.extendedData = new ArrayList();
32 | }
33 |
34 | public Geometry getGeometry() {
35 | return geometry;
36 | }
37 |
38 | public void setGeometry(Geometry geometry) {
39 | this.geometry = geometry;
40 | }
41 |
42 | public String getType() {
43 | return type;
44 | }
45 |
46 | public void setType(String type) {
47 | this.type = type;
48 | }
49 |
50 | public String getText() {
51 | return text;
52 | }
53 |
54 | public void setText(String text) {
55 | this.text = text;
56 | }
57 |
58 | public List getExtendedData() {
59 | return extendedData;
60 | }
61 |
62 | public void AddExtendedData(ExtendedData extendedData) {
63 | this.getExtendedData().add(extendedData);
64 | }
65 |
66 | public void AddExtendedData(String name, Class> type, Object value) {
67 | this.getExtendedData().add(new ExtendedData(name, type, value));
68 | }
69 |
70 | public String getId() {
71 | return id;
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/dxf/src/main/java/org/kabeja/processing/ImageFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2005 Simon Mieth
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 | package org.kabeja.processing;
17 |
18 | import java.io.File;
19 | import java.util.Iterator;
20 | import java.util.Map;
21 | import org.kabeja.dxf.DXFConstants;
22 | import org.kabeja.dxf.DXFDocument;
23 | import org.kabeja.dxf.DXFImage;
24 | import org.kabeja.dxf.DXFLayer;
25 | import org.kabeja.dxf.objects.DXFImageDefObject;
26 |
27 | /**
28 | * @author Simon Mieth
29 | */
30 | public class ImageFilter extends AbstractPostProcessor {
31 | /*
32 | * (non-Javadoc)
33 | *
34 | * @see org.kabeja.tools.PostProcessor#process(org.kabeja.dxf.DXFDocument,
35 | * java.util.Map)
36 | */
37 | public void process(DXFDocument doc, Map context) throws ProcessorException {
38 | Iterator i = doc.getDXFLayerIterator();
39 |
40 | while (i.hasNext()) {
41 | DXFLayer l = (DXFLayer) i.next();
42 |
43 | if (l.hasDXFEntities(DXFConstants.ENTITY_TYPE_IMAGE)) {
44 | Iterator in = l.getDXFEntities(DXFConstants.ENTITY_TYPE_IMAGE).iterator();
45 |
46 | while (in.hasNext()) {
47 | DXFImage img = (DXFImage) in.next();
48 | String imgDef = img.getImageDefObjectID();
49 | DXFImageDefObject def = (DXFImageDefObject) doc.getDXFObjectByID(imgDef);
50 | File f = new File(def.getFilename());
51 |
52 | if (!f.exists()) {
53 | in.remove();
54 | }
55 | }
56 | }
57 | }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------