Revision 706
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/pom.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
3 |
|
|
4 |
<modelVersion>4.0.0</modelVersion> |
|
5 |
<artifactId>org.gvsig.lidar.app</artifactId> |
|
6 |
<packaging>pom</packaging> |
|
7 |
<name>org.gvsig.lidar.app</name> |
|
8 |
<parent> |
|
9 |
<groupId>org.gvsig</groupId> |
|
10 |
<artifactId>org.gvsig.lidar</artifactId> |
|
11 |
<version>1.0.20</version> |
|
12 |
</parent> |
|
13 |
|
|
14 |
<modules> |
|
15 |
<module>org.gvsig.lidar.app.mainplugin</module> |
|
16 |
<!-- |
|
17 |
<module>org.gvsig.lidar.app.export</module> |
|
18 |
--> |
|
19 |
</modules> |
|
20 |
</project> |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/pom.xml | ||
---|---|---|
1 |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
|
2 |
<modelVersion>4.0.0</modelVersion> |
|
3 |
<parent> |
|
4 |
<groupId>org.gvsig</groupId> |
|
5 |
<artifactId>org.gvsig.lidar.app</artifactId> |
|
6 |
<version>1.0.19-SNAPSHOT</version> |
|
7 |
</parent> |
|
8 |
<artifactId>org.gvsig.lidar.app.export</artifactId> |
|
9 |
|
|
10 |
<dependencies> |
|
11 |
<dependency> |
|
12 |
<groupId>org.gvsig</groupId> |
|
13 |
<artifactId>org.gvsig.lidar.prov.common</artifactId> |
|
14 |
</dependency> |
|
15 |
<dependency> |
|
16 |
<groupId>org.gvsig</groupId> |
|
17 |
<artifactId>org.gvsig.lidar.prov.whitebox</artifactId> |
|
18 |
</dependency> |
|
19 |
<dependency> |
|
20 |
<groupId>org.gvsig</groupId> |
|
21 |
<artifactId>org.gvsig.lidar.prov.jgrass</artifactId> |
|
22 |
</dependency> |
|
23 |
<dependency> |
|
24 |
<groupId>org.gvsig</groupId> |
|
25 |
<artifactId>org.gvsig.andami</artifactId> |
|
26 |
<scope>compile</scope> |
|
27 |
</dependency> |
|
28 |
<dependency> |
|
29 |
<groupId>org.gvsig</groupId> |
|
30 |
<artifactId>org.gvsig.i18n</artifactId> |
|
31 |
<scope>compile</scope> |
|
32 |
</dependency> |
|
33 |
<dependency> |
|
34 |
<groupId>org.gvsig</groupId> |
|
35 |
<artifactId>org.gvsig.tools.lib</artifactId> |
|
36 |
<scope>compile</scope> |
|
37 |
</dependency> |
|
38 |
<dependency> |
|
39 |
<groupId>org.gvsig</groupId> |
|
40 |
<artifactId>org.gvsig.app.mainplugin</artifactId> |
|
41 |
<scope>compile</scope> |
|
42 |
</dependency> |
|
43 |
<dependency> |
|
44 |
<groupId>whitebox</groupId> |
|
45 |
<artifactId>whitebox-api</artifactId> |
|
46 |
<scope>compile</scope> |
|
47 |
</dependency> |
|
48 |
<dependency> |
|
49 |
<groupId>org.jgrasstools</groupId> |
|
50 |
<artifactId>jgt-jgrassgears</artifactId> |
|
51 |
<scope>compile</scope> |
|
52 |
</dependency> |
|
53 |
<dependency> |
|
54 |
<groupId>net.java.dev.jna</groupId> |
|
55 |
<artifactId>jna</artifactId> |
|
56 |
<scope>compile</scope> |
|
57 |
</dependency> |
|
58 |
<dependency> |
|
59 |
<groupId>org.gvsig</groupId> |
|
60 |
<artifactId>org.gvsig.exportto.swing.api</artifactId> |
|
61 |
<scope>compile</scope> |
|
62 |
</dependency> |
|
63 |
<dependency> |
|
64 |
<groupId>org.gvsig</groupId> |
|
65 |
<artifactId>org.gvsig.exportto.lib.api</artifactId> |
|
66 |
<scope>compile</scope> |
|
67 |
</dependency> |
|
68 |
<dependency> |
|
69 |
<groupId>org.gvsig</groupId> |
|
70 |
<artifactId>org.gvsig.tools.swing.api</artifactId> |
|
71 |
<scope>compile</scope> |
|
72 |
</dependency> |
|
73 |
<dependency> |
|
74 |
<groupId>org.opengis</groupId> |
|
75 |
<artifactId>geoapi</artifactId> |
|
76 |
<scope>compile</scope> |
|
77 |
</dependency> |
|
78 |
|
|
79 |
</dependencies> |
|
80 |
<properties> |
|
81 |
<!-- Package info property values --> |
|
82 |
<!-- Default values in org.gvsig.desktop --> |
|
83 |
<gvsig.install.plugin.package>true</gvsig.install.plugin.package> |
|
84 |
<gvsig.install.plugin>true</gvsig.install.plugin> |
|
85 |
<gvsig.package.info.name>Export: LAS file export support</gvsig.package.info.name> |
|
86 |
<gvsig.package.info.state>testing</gvsig.package.info.state> |
|
87 |
<gvsig.package.info.official>true</gvsig.package.info.official> |
|
88 |
<gvsig.package.info.dependencies>required: org.gvsig.app.mainplugin -ge 2.1.0-A</gvsig.package.info.dependencies> |
|
89 |
<gvsig.package.info.categories>Formats,Vector,Export</gvsig.package.info.categories> |
|
90 |
<gvsig.package.info.poolURL>https://devel.gvsig.org/download/projects/gvsig-lidar/pool</gvsig.package.info.poolURL> |
|
91 |
<gvsig.package.info.state>testing</gvsig.package.info.state> |
|
92 |
<gvsig.package.info.official>true</gvsig.package.info.official> |
|
93 |
<gvsig.package.info.operatingSystem>all</gvsig.package.info.operatingSystem> |
|
94 |
<gvsig.package.info.architecture>all</gvsig.package.info.architecture> |
|
95 |
</properties> |
|
96 |
</project> |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/buildNumber.properties | ||
---|---|---|
1 |
#Tue Jul 10 00:21:13 CEST 2018 |
|
2 |
buildNumber=31 |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/resources-plugin/README_en.txt | ||
---|---|---|
1 |
org.gvsig.lidar |
|
2 |
=============== |
|
3 |
|
|
4 |
org.gvsig.lidar is a provider to read and write LAS files on gvSIG, as |
|
5 |
defined by LAS specification: |
|
6 |
https://www.asprs.org/committee-general/laser-las-file-format-exchange-activities.html |
|
7 |
|
|
8 |
The plugin is designed to work on gvSIG 2.2 and 2.3. It requires gvSIG to be |
|
9 |
executed with a Java JVM version 8.0 or higher, as the libraries it uses |
|
10 |
require Java 8.0. |
|
11 |
|
|
12 |
LAS files are dessigned to store clouds of 3D points captured using LIDAR |
|
13 |
sensors. They have a set of mandatory fields and set of optional ones, |
|
14 |
depending on the point data format specified on the LAS header. |
|
15 |
|
|
16 |
The following mandatory fields are exposed as layer fields by the DAL |
|
17 |
providers: |
|
18 |
- CLASSIFICATION |
|
19 |
- POINTX (x coordinate of the point) |
|
20 |
- POINTY (y coordinate of the point) |
|
21 |
- POINTZ (z coordinate of the point, useful to symbolize terrain elevation) |
|
22 |
- INTENSITY |
|
23 |
- RETURNNUM (return number) |
|
24 |
- NUMBEROFRETURNS (number of returns) |
|
25 |
|
|
26 |
The following optional fields are exposed as layer fields by the DAL |
|
27 |
providers when available on the LAS file: |
|
28 |
- COLOR (point color expressed as an RGB Java long) |
|
29 |
- TIME (absolute capture time as a long integer, as generated by Data.getTime()) |
|
30 |
- WEEKTIME (relative capture time, expressed as GPS week time) |
|
31 |
|
|
32 |
org.gvsig.lidar provides 2 different LAS drivers, based on 2 different |
|
33 |
libraries: |
|
34 |
- The JGrasstools-based provider is a read/write driver. It will use |
|
35 |
the C-based libLas library if available on the native library path, |
|
36 |
and it will use a pure Java implementation if libLAS is not available |
|
37 |
or not successfully loaded. Note that only the Java version has been |
|
38 |
tested. |
|
39 |
- The Whitebox-based provider is a pure Java read-only driver. It currently |
|
40 |
performs better than the JGrasstools Java-based one. |
|
41 |
|
|
42 |
Both drivers include 2 thinning (simplification) parameters, in order to |
|
43 |
read a subset of the total available points on the LAS file: |
|
44 |
- thinningDivisor: reads 1 of every n points (1/n), e.g. thinningDivisor=10 |
|
45 |
loads 10% of total points |
|
46 |
- thinningResolution: Loads n points per square map unit, e.g. |
|
47 |
thinningResolution=0.0001 loads 0.0001 points/m2 (assumming that the units |
|
48 |
of the projection of the example layer are metres), which is the same |
|
49 |
as 100 points/km2 |
|
50 |
|
|
51 |
Note that thinningDivisor is ignored when thinningResolution is > 0. |
|
52 |
The thinning is useful to quickly render huge files on smaller scales. |
|
53 |
|
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/resources-plugin/i18n/text_en.properties | ||
---|---|---|
1 |
error_creating_properties_panel=Error creating properties panel |
|
2 |
error_getting_selected_layer_properties = Error getting selected layer properties |
|
3 |
Do_not_filter_by_envelope=Do not filter by envelope |
|
4 |
Use_View_envelope=Use View envelope |
|
5 |
Use_custom_envelope_\(coordinates_using_data_source_projection\)=Use custom envelope \(coordinates expressed using data source projection\) |
|
6 |
Filter_by_envelope=Filter by envelope |
|
7 |
LAS file=LAS file |
|
8 |
thinningDivisor=Thinning divisor |
|
9 |
thinningResolution=Thinning resolution |
|
10 |
LIDAR LAS file (jgrasstools)=LIDAR LAS file (jgrasstools) |
|
11 |
LIDAR LAS file (whitebox)=LIDAR LAS file (whitebox) |
|
12 |
Loads n points per square map unit (e.g. 0.0001 points/m2 on a projected layer or 100 points/km2)=Loads n points per square map unit (e.g. 0.0001 points/m2 on a projected layer or 100 points/km2) |
|
13 |
Loads only 1 of every n points (1/n), e.g. thinningDivisor=10 loads 10% of total points=Loads only 1 of every n points (1/n), e.g. thinningDivisor=10 loads 10% of total points |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/resources-plugin/i18n/text.properties | ||
---|---|---|
1 |
Use_custom_envelope_\(coordinates_using_data_source_projection\)=Use custom envelope \(coordinates using data source projection\) |
|
2 |
error_creating_properties_panel= Error creando panel de propiedades |
|
3 |
error_getting_selected_layer_properties = Error al obtener las propiedades de la capas seleccionadas |
|
4 |
Do_not_filter_by_envelope=No filtrar por extensi?n geom?trica |
|
5 |
Use_View_envelope=Usar extensi?n geom?trica de la Vista |
|
6 |
Use_custom_envelope_\(coordinates_using_data_source_projection\)=Usar extensi?n personalizada \(coordenadas expresadas en la proyecci?n de la fuente de datos\) |
|
7 |
Filter_by_envelope=Filtrar por extensi?n geom?trica |
|
8 |
LAS file=Fichero LAS |
|
9 |
thinningDivisor=Divisor de aclarado de datos |
|
10 |
thinningResolution=Resoluci?n de aclarado de datos |
|
11 |
LIDAR LAS file (jgrasstools)=Fichero LIDAR LAS (jgrasstools) |
|
12 |
LIDAR LAS file (whitebox)=Fichero LIDAR LAS (whitebox) |
|
13 |
Loads n points per square map unit (e.g. 0.0001 points/m2 on a projected layer or 100 points/km2)=Carga n puntos por unidad cuadrada del mapa (por ejemplo 0.0001 puntos/m2 en una capa proyectada o 100 puntos/km2) |
|
14 |
Loads only 1 of every n points (1/n), e.g. thinningDivisor=10 loads 10% of total points=Carga ?nicamente 1 de cada n puntos (1/n), por ejemplo thinningDivisor=10 carga el 10% de los puntos totales |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/resources-plugin/README_es.txt | ||
---|---|---|
1 |
org.gvsig.lidar |
|
2 |
=============== |
|
3 |
|
|
4 |
org.gvsig.lidar es un proveedor de datos para leer y escribir ficheros LAS en |
|
5 |
gvSIG, siguiendo la especificación de LAS: |
|
6 |
https://www.asprs.org/committee-general/laser-las-file-format-exchange-activities.html |
|
7 |
|
|
8 |
El plugin está diseñado para funciontar en gvSIG 2.2 y 2.3. Requiere que gvSIG |
|
9 |
se ejecute con una máquina virtual Java versión 8.0 o superior, ya que las |
|
10 |
librerías que utiliza requieren Java 8.0. |
|
11 |
|
|
12 |
Los ficheros LAS están diseñados para almacenar nubes de puntos 3D capturados |
|
13 |
usando sensores LIDAR. Poseen un conjunto de campos obligatorios (fijos) y |
|
14 |
otros opcionales que dependen de formato de datos de punto que se especifique |
|
15 |
en la cabecera del fichero LAS. |
|
16 |
|
|
17 |
Los siguientes campos obligatorios se exponen como campos de capa por el |
|
18 |
proveedor DAL: |
|
19 |
- CLASSIFICATION (clasificación de coberturas del suelo) |
|
20 |
- POINTX (coordenada x del punto) |
|
21 |
- POINTY (coordenada y del punto) |
|
22 |
- POINTZ (coordenada z del punto, útil para simbolizar elevaciones del terreno) |
|
23 |
- INTENSITY (intensidad) |
|
24 |
- RETURNNUM (número de retorno del punto) |
|
25 |
- NUMBEROFRETURNS (número de retornos para este pulso láser) |
|
26 |
|
|
27 |
Los siguientes campos opcionales se exponen como campos de capa por el |
|
28 |
proveedor DAL cuando están disponibles en el fichero LAS: |
|
29 |
- COLOR (color del punto, expresado como un entero "long" de Java que |
|
30 |
contiene el valor RGB) |
|
31 |
- TIME (tiempo absoluto de captura, expresado tal como genera Data.getTime()) |
|
32 |
- WEEKTIME (tiempo relativo de captura, expresado como tiempo GPS semanal) |
|
33 |
|
|
34 |
org.gvsig.lidar proporciona 2 drivers LAS diferentes, basados en 2 librerías |
|
35 |
diferentes: |
|
36 |
- El proveedor basado en JGrasstools es un proveedor de lectura/escritura. |
|
37 |
Utiliza la librería basada en C libLAS si está disponible en el "library |
|
38 |
path" nativo, y utiliza una implementación en Java puro si libLAS no está |
|
39 |
disponible o no se ha cargado correctamente. Nótese que sólo se ha probado |
|
40 |
la implementación basada en Java. |
|
41 |
- El proveedor basado en Whitebox es un driver de sólo lectura basado en Java |
|
42 |
puro. Actualmente ofrece mejor rendimiento que la implementación Java de |
|
43 |
JGrasstools. |
|
44 |
|
|
45 |
Ambos drivers incluyen 2 parámetros de "aclarado" (simplificación), que |
|
46 |
permiten leer un subconjunto del total de puntos disponibles en el fichero |
|
47 |
LAS: |
|
48 |
- thinningDivisor: lee 1 de cada n puntos (1/), por ejemplo thinningDivisor=10 |
|
49 |
carga el 10% del total de puntos disponibles |
|
50 |
- thinningResolution: Carga aproximadamente n puntos por unidad cuadrada de |
|
51 |
la capa; por ejemplo, thinningResolution=0.0001 carga 0.0001 puntos/m2 |
|
52 |
(asumiendo que las unidades de la proyección de la capa de ejemplo son |
|
53 |
metros), o lo que es lo mismo, 100 puntos/km2 |
|
54 |
|
|
55 |
Nótese que el parámetro thinningDivisor no tiene efecto cuando |
|
56 |
el parámetro thinningResolution es > 0. |
|
57 |
|
|
58 |
El aclarado permite dibujar rápidamente ficheros enormes a pequeñas escalas |
|
59 |
(en las que no se requiere un nivel de detalle tan elevado como el que |
|
60 |
provee el fichero). |
|
61 |
|
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/resources-plugin/config.xml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="ISO-8859-1"?> |
|
2 |
<plugin-config> |
|
3 |
<depends plugin-name="org.gvsig.app.mainplugin" /> |
|
4 |
<depends plugin-name="org.gvsig.exportto.app.mainplugin" /> |
|
5 |
<libraries library-dir="lib"/> |
|
6 |
<resourceBundle name="text"/> |
|
7 |
<extensions> |
|
8 |
<extension class-name="org.gvsig.lidar.app.mainplugin.LIDARExtension" |
|
9 |
description="" |
|
10 |
active="true" |
|
11 |
priority="1"> |
|
12 |
</extension> |
|
13 |
</extensions> |
|
14 |
</plugin-config> |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/resources-plugin/images/layer/layer-icon-lidar.svg | ||
---|---|---|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
|
2 |
<!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> |
|
3 |
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 355.6 273.5" style="enable-background:new 0 0 355.6 273.5;" xml:space="preserve"> |
|
4 |
<style type="text/css"> |
|
5 |
.st0{fill:#D80027;} |
|
6 |
.st1{fill:#2C3E50;} |
|
7 |
.st2{fill:#FFDA44;} |
|
8 |
</style> |
|
9 |
<path class="st0" d="M235.3,224l-63.8-87.5c-1-1.7-4.9-3.9-8.7-0.8l-49,46.6c-1.8,1.7-2.3,4.3-1.3,6.6l26.4,60.3l-9.6,9.6 l-39.1-53.6c-1.1-1.5-2.9-2.4-4.7-2.4c-0.4,0-9.3,2.5-13.4-1.3c-2.3-2.2-2.8-6.6-1.5-12c0.5-2.3-0.3-4.7-2.2-6.1l-53.6-39.1l9.6-9.6 l60.3,26.4c2.2,1,4.9,0.4,6.6-1.3l46.6-49c2.2-2,2.2-6.3-0.8-8.7L49.6,38.2l21-21l106.5,46.6c2.3,1,4.9,0.5,6.6-1.3l37.3-39.2 c6.8-7.2,25.1-17.4,36.2-6.8c11.6,11.1,0.2,29.4-6.9,36.2l-39.2,37.2c-1.8,1.7-2.3,4.3-1.3,6.6L256.3,203L235.3,224z"/> |
|
10 |
<path class="st1" d="M251.7,163.3l-29.6-67.7l36.2-34.4c12.3-10.5,23.3-36.1,7.1-52.9c-16.4-16.9-42.5-4.3-52.9,7L178,51.5L71.6,4.9 c-2.2-1-4.8-0.5-6.5,1.2L36.5,34.8c-3.5,4.1-0.7,7.8,0.7,8.8l87.6,63.9l-39.2,41.2l-60.2-26.3c-2.2-1-4.8-0.5-6.5,1.2L1.6,140.8 c-3,3.5-1.4,7.5,0.7,8.8l56.2,41c-1,7.9,0.8,14.6,5.3,19.1c4.5,4.4,11.2,6.3,19.1,5.3l40.9,56.2c2.8,3.6,6.9,2.4,8.8,0.7l17.2-17.2 c1.7-1.7,2.2-4.3,1.2-6.5L124.8,188l41.2-39.2l63.9,87.6c2.6,3.5,7,2.6,8.8,0.7l28.7-28.6c1.7-1.7,2.2-4.3,1.2-6.5l-11.8-27.1 L251.7,163.3z M235.3,224l-63.8-87.5c-1-1.7-4.9-3.9-8.7-0.8l-49,46.6c-1.8,1.7-2.3,4.3-1.3,6.6l26.4,60.3l-9.6,9.6l-39.1-53.6 c-1.1-1.5-2.9-2.4-4.7-2.4c-0.4,0-9.3,2.5-13.4-1.3c-2.3-2.2-2.8-6.6-1.5-12c0.5-2.3-0.3-4.7-2.2-6.1l-53.6-39.1l9.6-9.6l60.3,26.4 c2.2,1,4.9,0.4,6.6-1.3l46.6-49c2.2-2,2.2-6.3-0.8-8.7L49.6,38.2l21-21l106.5,46.6c2.3,1,4.9,0.5,6.6-1.3l37.3-39.2 c6.8-7.2,25.1-17.4,36.2-6.8c11.6,11.1,0.2,29.4-6.9,36.2l-39.2,37.2c-1.8,1.7-2.3,4.3-1.3,6.6L256.3,203L235.3,224z M235.3,224"/> |
|
11 |
<g> |
|
12 |
<path class="st2" d="M286.1,54.3L268.3,72c11.5,11.5,18.3,27.3,18.3,43.7c0,16.3-6.8,32.1-18.4,43.7l17.8,17.8 C319.6,143.5,319.7,87.9,286.1,54.3L286.1,54.3z"/> |
|
13 |
<path class="st2" d="M317.5,22.9l-17.7,17.7c41.1,41.2,41,109.1-0.2,150.2l17.7,17.8C368.3,157.7,368.4,73.9,317.5,22.9L317.5,22.9 z"/> |
|
14 |
</g> |
|
15 |
<path class="st1" d="M235.3,224"/> |
|
16 |
</svg> |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/resources/META-INF/services/org.gvsig.tools.library.Library | ||
---|---|---|
1 |
org.gvsig.exportto.swing.prov.lidar.ExporttoLASProviderLibrary |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/assembly/gvsig-plugin-package.xml | ||
---|---|---|
1 |
<!-- gvSIG. Desktop Geographic Information System. Copyright (C) 2007-2016 |
|
2 |
gvSIG Association. This program is free software; you can redistribute it |
|
3 |
and/or modify it under the terms of the GNU General Public License as published |
|
4 |
by the Free Software Foundation; either version 3 of the License, or (at |
|
5 |
your option) any later version. This program is distributed in the hope that |
|
6 |
it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty |
|
7 |
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
8 |
Public License for more details. You should have received a copy of the GNU |
|
9 |
General Public License along with this program; if not, write to the Free |
|
10 |
Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, |
|
11 |
USA. For any additional information, do not hesitate to contact us at info |
|
12 |
AT gvsig.com, or visit our website www.gvsig.com. --> |
|
13 |
<assembly> |
|
14 |
<id>gvsig-plugin-package</id> |
|
15 |
<formats> |
|
16 |
<format>zip</format> |
|
17 |
</formats> |
|
18 |
<baseDirectory>${project.artifactId}</baseDirectory> |
|
19 |
<includeBaseDirectory>true</includeBaseDirectory> |
|
20 |
<files> |
|
21 |
<file> |
|
22 |
<source>target/${project.artifactId}-${project.version}.jar</source> |
|
23 |
<outputDirectory>lib</outputDirectory> |
|
24 |
</file> |
|
25 |
<file> |
|
26 |
<source>target/package.info</source> |
|
27 |
</file> |
|
28 |
</files> |
|
29 |
|
|
30 |
<fileSets> |
|
31 |
<fileSet> |
|
32 |
<directory>src/main/resources-plugin</directory> |
|
33 |
<outputDirectory>.</outputDirectory> |
|
34 |
</fileSet> |
|
35 |
</fileSets> |
|
36 |
|
|
37 |
|
|
38 |
<dependencySets> |
|
39 |
<dependencySet> |
|
40 |
<useProjectArtifact>false</useProjectArtifact> |
|
41 |
<useTransitiveDependencies>false</useTransitiveDependencies> |
|
42 |
<outputDirectory>lib</outputDirectory> |
|
43 |
<includes> |
|
44 |
<include>org.gvsig:org.gvsig.lidar.prov.common</include> |
|
45 |
<include>org.gvsig:org.gvsig.lidar.prov.whitebox</include> |
|
46 |
<include>org.gvsig:org.gvsig.lidar.prov.jgrass</include> |
|
47 |
<include>whitebox:whitebox-api:jar</include> |
|
48 |
<include>org.jgrasstools:jgt-jgrassgears</include> |
|
49 |
<include>net.java.dev.jna:jna</include> |
|
50 |
<include>org.opengis:geoapi</include> |
|
51 |
</includes> |
|
52 |
</dependencySet> |
|
53 |
|
|
54 |
</dependencySets> |
|
55 |
|
|
56 |
</assembly> |
|
57 |
|
|
58 |
|
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/java/org/gvsig/lidar/export/service/ExportLASService.java | ||
---|---|---|
1 |
package org.gvsig.lidar.export.service; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
import org.apache.commons.io.FilenameUtils; |
|
5 |
import org.gvsig.export.ExportException; |
|
6 |
import org.gvsig.export.ExportLocator; |
|
7 |
import org.gvsig.export.ExportParametersGeometry; |
|
8 |
import org.gvsig.export.spi.AbstractExportService; |
|
9 |
import org.gvsig.export.spi.ExportService; |
|
10 |
import org.gvsig.export.spi.ExportServiceFactory; |
|
11 |
import org.gvsig.export.spi.ExportServiceManager; |
|
12 |
import org.gvsig.fmap.dal.DALLocator; |
|
13 |
import org.gvsig.fmap.dal.DataManager; |
|
14 |
import org.gvsig.fmap.dal.DataServerExplorer; |
|
15 |
import org.gvsig.fmap.dal.NewDataStoreParameters; |
|
16 |
import org.gvsig.fmap.dal.OpenDataStoreParameters; |
|
17 |
import org.gvsig.fmap.dal.exception.DataException; |
|
18 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
|
19 |
import org.gvsig.fmap.dal.feature.Feature; |
|
20 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
21 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
22 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
23 |
import org.gvsig.fmap.dal.feature.NewFeatureStoreParameters; |
|
24 |
import org.gvsig.fmap.dal.feature.OpenFeatureStoreParameters; |
|
25 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorer; |
|
26 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorerParameters; |
|
27 |
import org.gvsig.fmap.geom.Geometry; |
|
28 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
29 |
import org.gvsig.lidar.prov.LASNewStoreParameters; |
|
30 |
import org.gvsig.lidar.prov.LASOpenStoreParameters; |
|
31 |
import org.gvsig.lidar.prov.jgrasstools.JGrassLASDataStoreProvider; |
|
32 |
import org.gvsig.lidar.prov.jgrasstools.JGrassLASWriter; |
|
33 |
import org.gvsig.tools.dispose.DisposableIterator; |
|
34 |
import org.gvsig.tools.dispose.DisposeUtils; |
|
35 |
import org.gvsig.tools.util.HasAFile; |
|
36 |
|
|
37 |
/** |
|
38 |
* |
|
39 |
* @author jjdelcerro |
|
40 |
*/ |
|
41 |
public class ExportLASService |
|
42 |
extends AbstractExportService |
|
43 |
implements ExportService |
|
44 |
{ |
|
45 |
|
|
46 |
public ExportLASService(ExportServiceFactory factory, ExportLASParameters parameters) { |
|
47 |
super(factory, parameters); |
|
48 |
} |
|
49 |
|
|
50 |
@Override |
|
51 |
public ExportLASParameters getParameters() { |
|
52 |
return (ExportLASParameters) super.getParameters(); |
|
53 |
} |
|
54 |
|
|
55 |
@Override |
|
56 |
protected DataServerExplorer createServerExplorer() throws ExportException{ |
|
57 |
|
|
58 |
DataManager dataManager = DALLocator.getDataManager(); |
|
59 |
|
|
60 |
FilesystemServerExplorerParameters explorerParams; |
|
61 |
try { |
|
62 |
explorerParams = |
|
63 |
(FilesystemServerExplorerParameters) dataManager |
|
64 |
.createServerExplorerParameters(FilesystemServerExplorer.NAME); |
|
65 |
} catch (Exception e) { |
|
66 |
throw new ExportException(e); |
|
67 |
} |
|
68 |
explorerParams.setRoot(this.getParameters().getFile().getParent()); |
|
69 |
|
|
70 |
FilesystemServerExplorer explorer; |
|
71 |
try { |
|
72 |
explorer = (FilesystemServerExplorer) dataManager.openServerExplorer( |
|
73 |
"FilesystemExplorer", explorerParams |
|
74 |
); |
|
75 |
return explorer; |
|
76 |
} catch (Exception e) { |
|
77 |
throw new ExportException(e); |
|
78 |
} |
|
79 |
} |
|
80 |
|
|
81 |
@Override |
|
82 |
protected LASNewStoreParameters createTargetNewStoreParameters() throws ExportException { |
|
83 |
LASNewStoreParameters newStoreParameters = new LASNewStoreParameters(JGrassLASDataStoreProvider.NAME); |
|
84 |
newStoreParameters.setFile(getParameters().getFile()); |
|
85 |
newStoreParameters.setCRS(this.getParameters().getTargetProjection()); |
|
86 |
return newStoreParameters; |
|
87 |
} |
|
88 |
|
|
89 |
@Override |
|
90 |
public LASOpenStoreParameters createTargetOpenStoreParameters() throws ExportException { |
|
91 |
try { |
|
92 |
DataManager dataManager = DALLocator.getDataManager(); |
|
93 |
LASOpenStoreParameters openStoreParameters = (LASOpenStoreParameters) dataManager.createStoreParameters(JGrassLASDataStoreProvider.NAME); |
|
94 |
((HasAFile)openStoreParameters).setFile(getParameters().getFile()); |
|
95 |
openStoreParameters.setDynValue("CRS", this.getParameters().getTargetProjection()); |
|
96 |
|
|
97 |
openStoreParameters.validate(); |
|
98 |
return openStoreParameters; |
|
99 |
} catch (Exception ex) { |
|
100 |
throw new ExportException(ex); |
|
101 |
} |
|
102 |
} |
|
103 |
|
|
104 |
@Override |
|
105 |
public void export(FeatureSet featureSet) throws ExportException { |
|
106 |
DataServerExplorer explorer = createServerExplorer(); |
|
107 |
LASNewStoreParameters newStoreParameters = createTargetNewStoreParameters(); |
|
108 |
LASOpenStoreParameters openStoreParameters = createTargetOpenStoreParameters(); |
|
109 |
|
|
110 |
String providerName = newStoreParameters.getDataStoreName(); |
|
111 |
String explorerName = explorer.getProviderName(); |
|
112 |
|
|
113 |
DisposableIterator it = null; |
|
114 |
EditableFeature targetFeature = null; |
|
115 |
|
|
116 |
Envelope outEnvelope = null; |
|
117 |
if (coord_trans!=null) { |
|
118 |
outEnvelope = this.options.getSource().getEnvelope().convert(coord_trans); |
|
119 |
} |
|
120 |
else { |
|
121 |
outEnvelope = this.options.getSource().getEnvelope(); |
|
122 |
} |
|
123 |
|
|
124 |
try { |
|
125 |
this.getTaskStatus().setRangeOfValues(0, featureSet.getSize()); |
|
126 |
|
|
127 |
FeatureType theSourceFeatureType = featureSet.getDefaultFeatureType(); |
|
128 |
|
|
129 |
JGrassLASWriter writer = new JGrassLASWriter( |
|
130 |
newStoreParameters, |
|
131 |
outEnvelope |
|
132 |
); |
|
133 |
writer.open(); |
|
134 |
FeatureType theTargetFeatureType = writer.getFeatureType( |
|
135 |
this.getParameters().getTargetProjection() |
|
136 |
); |
|
137 |
|
|
138 |
// FeatureType theTargetFeatureType = target.getDefaultFeatureType(); |
|
139 |
|
|
140 |
ExportGeometryHelper geomHelper = null; |
|
141 |
if (this.getParameters() instanceof ExportParametersGeometry) { |
|
142 |
geomHelper = ExportLocator.getServiceManager().createGeometryHelper( |
|
143 |
(ExportParametersGeometry) this.getParameters(), |
|
144 |
theTargetFeatureType, |
|
145 |
theSourceFeatureType |
|
146 |
); |
|
147 |
if (!geomHelper.canProcessGeometry()) { |
|
148 |
geomHelper = null; |
|
149 |
} |
|
150 |
} |
|
151 |
// ============================================ |
|
152 |
|
|
153 |
// target.edit(FeatureStore.MODE_APPEND); |
|
154 |
it = featureSet.fastIterator(); |
|
155 |
|
|
156 |
long featureCount = 0; |
|
157 |
while (it.hasNext()) { |
|
158 |
this.getTaskStatus().setCurValue(featureCount); |
|
159 |
|
|
160 |
Feature sourceFeature = (Feature) it.next(); |
|
161 |
// targetFeature = target.createNewFeature(theTargetFeatureType, true); |
|
162 |
// copyValues(sourceFeature, targetFeature); |
|
163 |
writer.write(sourceFeature); |
|
164 |
|
|
165 |
if (geomHelper != null) { |
|
166 |
switch (geomHelper.copyGeometry(sourceFeature, targetFeature)) { |
|
167 |
case ExportServiceManager.FixGeometryStatus.STATE_OK: |
|
168 |
break; |
|
169 |
case ExportServiceManager.FixGeometryStatus.STATE_SKIP: |
|
170 |
continue; |
|
171 |
case ExportServiceManager.FixGeometryStatus.STATE_ABORT: |
|
172 |
throw new InvalidGeometryException(targetFeature, geomHelper.getLastErrorMessage()); |
|
173 |
} |
|
174 |
} |
|
175 |
|
|
176 |
target.insert(targetFeature); |
|
177 |
|
|
178 |
featureCount++; |
|
179 |
|
|
180 |
if (this.getTaskStatus().isCancellationRequested()) { |
|
181 |
return; |
|
182 |
} |
|
183 |
} |
|
184 |
target.finishEditing(); |
|
185 |
this.getTaskStatus().terminate(); |
|
186 |
this.getTaskStatus().remove(); |
|
187 |
fireFinishedListener(); |
|
188 |
} catch (Exception e) { |
|
189 |
fireCancelledListeners(); |
|
190 |
throw new ExportException(e, targetFeature); |
|
191 |
} finally { |
|
192 |
DisposeUtils.dispose(it); |
|
193 |
DisposeUtils.dispose(featureSet); |
|
194 |
DisposeUtils.dispose(target); |
|
195 |
} |
|
196 |
} |
|
197 |
|
|
198 |
|
|
199 |
} |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/java/org/gvsig/lidar/export/service/ExportLASParameters.java | ||
---|---|---|
1 |
package org.gvsig.lidar.export.service; |
|
2 |
|
|
3 |
import org.gvsig.export.ExportParametersGeometry; |
|
4 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
5 |
import org.gvsig.tools.util.HasAFile; |
|
6 |
|
|
7 |
/** |
|
8 |
* |
|
9 |
* @author jjdelcerro |
|
10 |
*/ |
|
11 |
public interface ExportLASParameters extends ExportParametersGeometry, HasAFile { |
|
12 |
|
|
13 |
|
|
14 |
public static final int POINTFORMAT_BASE = 0; |
|
15 |
public static final int POINTFORMAT_TIME = 1; |
|
16 |
public static final int POINTFORMAT_COLOR = 2; |
|
17 |
public static final int POINTFORMAT_TIME_AND_COLOR = 3; |
|
18 |
|
|
19 |
public static final int GPSTIME_WEEK = 0; |
|
20 |
public static final int GPSTIME_STANDARD = 1; |
|
21 |
|
|
22 |
public Envelope getFilterEnvelope(); |
|
23 |
|
|
24 |
public void setFilterEnvelope(Envelope envelope); |
|
25 |
|
|
26 |
public int getPointFormat(); |
|
27 |
|
|
28 |
public void setPointFormat(int pointFormat); |
|
29 |
|
|
30 |
public int getGPSTimeFormat(); |
|
31 |
|
|
32 |
public void setGPSTimeFormat(int gpsTimeFormat); |
|
33 |
} |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/java/org/gvsig/lidar/export/service/ExportLASParametersImpl.java | ||
---|---|---|
1 |
package org.gvsig.lidar.export.service; |
|
2 |
|
|
3 |
import java.io.File; |
|
4 |
import org.apache.commons.io.FilenameUtils; |
|
5 |
import org.gvsig.export.spi.AbstractExportParametersGeometry; |
|
6 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
7 |
|
|
8 |
/** |
|
9 |
* |
|
10 |
* @author jjdelcerro |
|
11 |
*/ |
|
12 |
public class ExportLASParametersImpl |
|
13 |
extends AbstractExportParametersGeometry |
|
14 |
implements ExportLASParameters |
|
15 |
{ |
|
16 |
private Envelope filterEnvelope; |
|
17 |
private File file; |
|
18 |
private int pointFormat = POINTFORMAT_TIME_AND_COLOR; |
|
19 |
private int gpsTimeFormat = GPSTIME_STANDARD; |
|
20 |
|
|
21 |
@Override |
|
22 |
public String getServiceName() { |
|
23 |
return ExportLASServiceFactory.SERVICE_NAME; |
|
24 |
} |
|
25 |
|
|
26 |
@Override |
|
27 |
public File getFile() { |
|
28 |
return this.file; |
|
29 |
} |
|
30 |
|
|
31 |
@Override |
|
32 |
public void setFile(File file) { |
|
33 |
this.file = new File(FilenameUtils.removeExtension(file.getAbsolutePath()) + ".las"); |
|
34 |
} |
|
35 |
|
|
36 |
@Override |
|
37 |
public Envelope getFilterEnvelope() { |
|
38 |
return this.filterEnvelope; |
|
39 |
} |
|
40 |
|
|
41 |
@Override |
|
42 |
public void setFilterEnvelope(Envelope envelope) { |
|
43 |
this.filterEnvelope = envelope; |
|
44 |
} |
|
45 |
|
|
46 |
@Override |
|
47 |
public int getPointFormat() { |
|
48 |
return this.pointFormat; |
|
49 |
} |
|
50 |
|
|
51 |
@Override |
|
52 |
public void setPointFormat(int pointFormat) { |
|
53 |
this.pointFormat = pointFormat; |
|
54 |
} |
|
55 |
|
|
56 |
@Override |
|
57 |
public int getGPSTimeFormat() { |
|
58 |
return this.gpsTimeFormat; |
|
59 |
} |
|
60 |
|
|
61 |
@Override |
|
62 |
public void setGPSTimeFormat(int gpsTimeFormat) { |
|
63 |
this.gpsTimeFormat = gpsTimeFormat; |
|
64 |
} |
|
65 |
} |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/java/org/gvsig/lidar/export/service/ExportLASServiceFactory.java | ||
---|---|---|
1 |
package org.gvsig.lidar.export.service; |
|
2 |
|
|
3 |
import org.gvsig.export.ExportParameters; |
|
4 |
import org.gvsig.export.spi.AbstractExportServiceFactory; |
|
5 |
|
|
6 |
/** |
|
7 |
* |
|
8 |
* @author jjdelcerro |
|
9 |
*/ |
|
10 |
public class ExportLASServiceFactory |
|
11 |
extends AbstractExportServiceFactory |
|
12 |
{ |
|
13 |
|
|
14 |
public static final String SERVICE_NAME = "LAS"; |
|
15 |
|
|
16 |
public ExportLASServiceFactory() { |
|
17 |
super( |
|
18 |
SERVICE_NAME, |
|
19 |
"_LAS_file_format_for_LIDAR_data", // LAS, formato de fichero para datos LiDAR |
|
20 |
"LAS, file format for LiDAR data, developed by the American Society for Photogrammetry & Remote Sensing (ASPRS)" |
|
21 |
); |
|
22 |
} |
|
23 |
|
|
24 |
@Override |
|
25 |
public ExportLASService createService(ExportParameters parameters) { |
|
26 |
ExportLASService service = new ExportLASService(this, (ExportLASParameters) parameters); |
|
27 |
return service; |
|
28 |
} |
|
29 |
|
|
30 |
@Override |
|
31 |
public ExportLASParameters createParameters() { |
|
32 |
ExportLASParameters parameters = new ExportLASParametersImpl(); |
|
33 |
return parameters; |
|
34 |
} |
|
35 |
|
|
36 |
@Override |
|
37 |
public boolean hasTabularSupport() { |
|
38 |
return true; |
|
39 |
} |
|
40 |
|
|
41 |
@Override |
|
42 |
public boolean hasVectorialSupport() { |
|
43 |
return true; |
|
44 |
} |
|
45 |
|
|
46 |
} |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/java/org/gvsig/exportto/swing/prov/lidar/ExporttoLASProvider.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2016 gvSIG Association. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or modify it under |
|
7 |
* the terms of the GNU General Public License as published by the Free Software |
|
8 |
* Foundation; either version 3 of the License, or (at your option) any later |
|
9 |
* version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
|
14 |
* details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License along with |
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51 |
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us at info AT |
|
21 |
* gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.exportto.swing.prov.lidar; |
|
24 |
|
|
25 |
import java.io.File; |
|
26 |
import java.util.ArrayList; |
|
27 |
import java.util.List; |
|
28 |
|
|
29 |
import org.cresques.cts.ICoordTrans; |
|
30 |
import org.cresques.cts.IProjection; |
|
31 |
import org.gvsig.exportto.ExporttoService; |
|
32 |
import org.gvsig.exportto.swing.panel.SelectEnvelopeOptionPanel; |
|
33 |
import org.gvsig.exportto.swing.prov.file.AbstractExporttoFileProvider; |
|
34 |
import org.gvsig.exportto.swing.spi.ExporttoSwingProviderPanel; |
|
35 |
import org.gvsig.fmap.dal.exception.DataException; |
|
36 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
37 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorerParameters; |
|
38 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
39 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
40 |
import org.slf4j.Logger; |
|
41 |
import org.slf4j.LoggerFactory; |
|
42 |
import org.gvsig.exportto.swing.prov.lidar.ExporttoLASService; |
|
43 |
|
|
44 |
/** |
|
45 |
* Exporto provider which gets Exporto from a file. |
|
46 |
* |
|
47 |
* @author <a href="mailto:cmartinez@scolab.es">Cesar Martinez Izquierdo</a> |
|
48 |
*/ |
|
49 |
public class ExporttoLASProvider extends AbstractExporttoFileProvider |
|
50 |
implements ExporttoLASOptions { |
|
51 |
|
|
52 |
private static Logger logger = LoggerFactory.getLogger( |
|
53 |
ExporttoLASProvider.class); |
|
54 |
|
|
55 |
protected List<ExporttoSwingProviderPanel> panels = new ArrayList<ExporttoSwingProviderPanel>(); |
|
56 |
|
|
57 |
private String storeName = null; |
|
58 |
protected SelectEnvelopeOptionPanel envelopePanel; |
|
59 |
|
|
60 |
public ExporttoLASProvider(ProviderServices providerServices, |
|
61 |
FeatureStore sourceStore, IProjection targetProjection) { |
|
62 |
super(providerServices, sourceStore, targetProjection); |
|
63 |
IProjection sourceProjection = getSourceSrs(sourceStore); |
|
64 |
envelopePanel = new SelectEnvelopeOptionPanel(sourceProjection); |
|
65 |
} |
|
66 |
|
|
67 |
protected IProjection getSourceSrs(FeatureStore sourceStore) { |
|
68 |
try { |
|
69 |
return sourceStore.getDefaultFeatureType().getDefaultGeometryAttribute().getSRS(); |
|
70 |
} catch (Exception e) {} |
|
71 |
return null; |
|
72 |
} |
|
73 |
|
|
74 |
public int getPanelCount() { |
|
75 |
return super.getPanelCount()+1; |
|
76 |
//return this.panels.size(); |
|
77 |
} |
|
78 |
|
|
79 |
public ExporttoSwingProviderPanel getPanelAt(int index) { |
|
80 |
if (super.getPanelCount()>index) { |
|
81 |
return super.getPanelAt(index); |
|
82 |
} |
|
83 |
else { |
|
84 |
return envelopePanel; |
|
85 |
} |
|
86 |
} |
|
87 |
|
|
88 |
public FeatureStore getSource() { |
|
89 |
return this.featureStore; |
|
90 |
} |
|
91 |
|
|
92 |
public ExporttoService createExporttoService() { |
|
93 |
return new ExporttoLASService(this); |
|
94 |
} |
|
95 |
|
|
96 |
public FilesystemServerExplorerParameters getExplorerParameters() { |
|
97 |
return null; |
|
98 |
// CMI return this.connectionPanel.getServerExplorerParameters(); |
|
99 |
} |
|
100 |
|
|
101 |
|
|
102 |
|
|
103 |
public File getOutputFile() { |
|
104 |
return this.selectFileOptionPanel.getSelectedFile(); |
|
105 |
} |
|
106 |
|
|
107 |
|
|
108 |
|
|
109 |
public IProjection getTargetProjection() { |
|
110 |
return this.projection; |
|
111 |
} |
|
112 |
|
|
113 |
|
|
114 |
public Envelope getFilterEnvelope() { |
|
115 |
return this.envelopePanel.getEnvelope(); |
|
116 |
} |
|
117 |
} |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/java/org/gvsig/exportto/swing/prov/lidar/ExporttoLASOptions.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2016 gvSIG Association. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or modify it under |
|
7 |
* the terms of the GNU General Public License as published by the Free Software |
|
8 |
* Foundation; either version 3 of the License, or (at your option) any later |
|
9 |
* version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
|
14 |
* details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License along with |
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51 |
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us at info AT |
|
21 |
* gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
|
|
24 |
package org.gvsig.exportto.swing.prov.lidar; |
|
25 |
|
|
26 |
import java.io.File; |
|
27 |
|
|
28 |
import org.cresques.cts.IProjection; |
|
29 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
30 |
import org.gvsig.fmap.dal.serverexplorer.filesystem.FilesystemServerExplorerParameters; |
|
31 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
32 |
|
|
33 |
|
|
34 |
/** |
|
35 |
* |
|
36 |
* @author <a href="mailto:cmartinez@scolab.es">Cesar Martinez Izquierdo</a> |
|
37 |
*/ |
|
38 |
public interface ExporttoLASOptions { |
|
39 |
|
|
40 |
public FilesystemServerExplorerParameters getExplorerParameters(); |
|
41 |
|
|
42 |
public File getOutputFile(); |
|
43 |
|
|
44 |
public FeatureStore getSource(); |
|
45 |
|
|
46 |
public IProjection getTargetProjection(); |
|
47 |
|
|
48 |
public Envelope getFilterEnvelope(); |
|
49 |
|
|
50 |
} |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/java/org/gvsig/exportto/swing/prov/lidar/ExporttoLASProviderLibrary.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2016 gvSIG Association. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or modify it under |
|
7 |
* the terms of the GNU General Public License as published by the Free Software |
|
8 |
* Foundation; either version 3 of the License, or (at your option) any later |
|
9 |
* version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
|
14 |
* details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License along with |
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51 |
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us at info AT |
|
21 |
* gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.exportto.swing.prov.lidar; |
|
24 |
|
|
25 |
import org.gvsig.exportto.swing.ExporttoSwingLibrary; |
|
26 |
import org.gvsig.exportto.swing.spi.ExporttoSwingProviderLocator; |
|
27 |
import org.gvsig.fmap.dal.DALLibrary; |
|
28 |
import org.gvsig.tools.ToolsLocator; |
|
29 |
import org.gvsig.tools.i18n.I18nManager; |
|
30 |
import org.gvsig.tools.library.AbstractLibrary; |
|
31 |
import org.gvsig.tools.library.LibraryException; |
|
32 |
import org.gvsig.tools.service.spi.ProviderManager; |
|
33 |
|
|
34 |
/** |
|
35 |
* @author <a href="mailto:cmartinez@scolab.es">Cesar Martinez Izquierdo</a> |
|
36 |
* |
|
37 |
*/ |
|
38 |
public class ExporttoLASProviderLibrary extends AbstractLibrary { |
|
39 |
|
|
40 |
@Override |
|
41 |
public void doRegistration() { |
|
42 |
registerAsServiceOf(ExporttoSwingLibrary.class); |
|
43 |
require(DALLibrary.class); |
|
44 |
require(ExporttoSwingLibrary.class); |
|
45 |
} |
|
46 |
|
|
47 |
@Override |
|
48 |
protected void doInitialize() throws LibraryException { |
|
49 |
I18nManager i18nManager = ToolsLocator.getI18nManager(); |
|
50 |
i18nManager.addResourceFamily( |
|
51 |
"org.gvsig.exportto.swing.prov.lidar", |
|
52 |
ExporttoLASProviderLibrary.class.getClassLoader(), |
|
53 |
ExporttoLASProviderLibrary.class.getClass().getName() |
|
54 |
); |
|
55 |
} |
|
56 |
|
|
57 |
@Override |
|
58 |
protected void doPostInitialize() throws LibraryException { |
|
59 |
ProviderManager providerManager = ExporttoSwingProviderLocator.getManager(); |
|
60 |
providerManager.addProviderFactory(new ExporttoLASProviderFactory()); |
|
61 |
} |
|
62 |
|
|
63 |
} |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/java/org/gvsig/exportto/swing/prov/lidar/ExporttoLASService.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2016 gvSIG Association. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or modify it under |
|
7 |
* the terms of the GNU General Public License as published by the Free Software |
|
8 |
* Foundation; either version 3 of the License, or (at your option) any later |
|
9 |
* version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
|
14 |
* details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License along with |
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51 |
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us at info AT |
|
21 |
* gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.exportto.swing.prov.lidar; |
|
24 |
|
|
25 |
import java.io.File; |
|
26 |
import java.util.Date; |
|
27 |
import java.util.List; |
|
28 |
|
|
29 |
import org.cresques.cts.ICoordTrans; |
|
30 |
import org.cresques.cts.IProjection; |
|
31 |
import org.gvsig.exportto.ExporttoService; |
|
32 |
import org.gvsig.exportto.ExporttoServiceException; |
|
33 |
import org.gvsig.exportto.ExporttoServiceFinishAction; |
|
34 |
import org.gvsig.fmap.dal.DALLocator; |
|
35 |
import org.gvsig.fmap.dal.DataStoreParameters; |
|
36 |
import org.gvsig.fmap.dal.exception.DataException; |
|
37 |
import org.gvsig.fmap.dal.feature.EditableFeature; |
|
38 |
import org.gvsig.fmap.dal.feature.Feature; |
|
39 |
import org.gvsig.fmap.dal.feature.FeatureAttributeDescriptor; |
|
40 |
import org.gvsig.fmap.dal.feature.FeatureReference; |
|
41 |
import org.gvsig.fmap.dal.feature.FeatureSet; |
|
42 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
43 |
import org.gvsig.fmap.dal.feature.FeatureType; |
|
44 |
import org.gvsig.fmap.geom.Geometry; |
|
45 |
import org.gvsig.fmap.geom.primitive.Envelope; |
|
46 |
import org.gvsig.lidar.prov.LASOpenStoreParameters; |
|
47 |
|
|
48 |
import org.gvsig.lidar.prov.jgrasstools.JGrassLASDataStoreProvider; |
|
49 |
import org.gvsig.lidar.prov.jgrasstools.JGrassLASWriter; |
|
50 |
import org.gvsig.timesupport.Instant; |
|
51 |
import org.gvsig.timesupport.Interval; |
|
52 |
import org.gvsig.tools.dispose.DisposableIterator; |
|
53 |
import org.gvsig.tools.dispose.DisposeUtils; |
|
54 |
import org.gvsig.tools.dynobject.DynObject; |
|
55 |
import org.gvsig.tools.evaluator.EvaluatorData; |
|
56 |
import org.gvsig.tools.task.AbstractMonitorableTask; |
|
57 |
import org.slf4j.Logger; |
|
58 |
import org.slf4j.LoggerFactory; |
|
59 |
|
|
60 |
/** |
|
61 |
* @author <a href="mailto:cmartinez@scolab.es">Cesar Martinez Izquierdo</a> |
|
62 |
* |
|
63 |
*/ |
|
64 |
public class ExporttoLASService extends AbstractMonitorableTask implements |
|
65 |
ExporttoService { |
|
66 |
|
|
67 |
private static final Logger logger = LoggerFactory.getLogger(ExporttoLASService.class); |
|
68 |
|
|
69 |
public static final int CHECK_NONE = 0; |
|
70 |
public static final int CHECK_IF_CORRUPT = 1; |
|
71 |
public static final int CHECK_IF_VALID = 2; |
|
72 |
|
|
73 |
public static final int ACTION_SET_GEOMETRY_TO_NULL = 0; |
|
74 |
public static final int ACTION_SKIP_FEATURE = 1; |
|
75 |
public static final int ACTION_ABORT = 2; |
|
76 |
|
|
77 |
private ExporttoServiceFinishAction exporttoServiceFinishAction = null; |
|
78 |
private ExporttoLASOptions options; |
|
79 |
|
|
80 |
public ExporttoLASService(ExporttoLASOptions options) { |
|
81 |
this.options = options; |
|
82 |
} |
|
83 |
|
|
84 |
|
|
85 |
public void export(FeatureSet featureSet) throws ExporttoServiceException { |
|
86 |
File outFile = this.options.getOutputFile(); |
|
87 |
DisposableIterator it = null; |
|
88 |
try { |
|
89 |
|
|
90 |
|
|
91 |
// ====================================== |
|
92 |
// Reprojection |
|
93 |
FeatureAttributeDescriptor geo_att = this.options.getSource().getDefaultFeatureType().getDefaultGeometryAttribute(); |
|
94 |
IProjection sourceProjection = null; |
|
95 |
ICoordTrans coord_trans = null; |
|
96 |
Geometry reproj_geom = null; |
|
97 |
Envelope filterEnvelope = this.options.getFilterEnvelope(); |
|
98 |
|
|
99 |
if (geo_att != null) { |
|
100 |
sourceProjection = geo_att.getSRS(); |
|
101 |
// FIXME: we should get the transformation from the options and not from the layer projection. |
|
102 |
// If the layer contains a CT, it has been set to convert from layer to view projection, |
|
103 |
// which is not necessarily the right one for the target export projection. |
|
104 |
// We will be able to improve these corner cases when the new CRS API is fully implemented |
|
105 |
if (sourceProjection != null && sourceProjection != this.options.getTargetProjection()) { |
|
106 |
coord_trans = sourceProjection.getCT(this.options.getTargetProjection()); |
|
107 |
} |
|
108 |
} |
|
109 |
|
|
110 |
// ============================================ |
|
111 |
|
|
112 |
LASOpenStoreParameters openParams = new LASOpenStoreParameters(JGrassLASDataStoreProvider.NAME); |
|
113 |
openParams.setFile(outFile); |
|
114 |
openParams.setCRS(this.options.getTargetProjection()); |
|
115 |
|
|
116 |
FeatureType sourceFeatureType = featureSet.getDefaultFeatureType(); |
|
117 |
|
|
118 |
Envelope outEnvelope = null; |
|
119 |
if (coord_trans!=null) { |
|
120 |
outEnvelope = this.options.getSource().getEnvelope().convert(coord_trans); |
|
121 |
} |
|
122 |
else { |
|
123 |
outEnvelope = this.options.getSource().getEnvelope(); |
|
124 |
} |
|
125 |
|
|
126 |
JGrassLASWriter writer = new JGrassLASWriter(openParams, sourceFeatureType, outEnvelope); |
|
127 |
writer.open(); |
|
128 |
|
|
129 |
int featureCount = 1; |
|
130 |
taskStatus.setRangeOfValues(0, featureSet.getSize()); |
|
131 |
logger.debug("Inserting rows"); |
|
132 |
taskStatus.message("Inserting rows"); |
|
133 |
it = featureSet.fastIterator(); |
|
134 |
while (it.hasNext()) { |
|
135 |
Feature feature = (Feature) it.next(); |
|
136 |
this.taskStatus.setCurValue(featureCount); |
|
137 |
Geometry geometry = feature.getDefaultGeometry(); |
|
138 |
if (filterEnvelope==null |
|
139 |
|| filterEnvelope.intersects(geometry)) { |
|
140 |
// ================================================ |
|
141 |
// Reprojection |
|
142 |
if (geometry != null && |
|
143 |
geo_att != null && coord_trans != null) { |
|
144 |
CustomFeatureImpl customFeature = new CustomFeatureImpl(feature); |
|
145 |
reproj_geom = geometry.cloneGeometry(); |
|
146 |
reproj_geom.reProject(coord_trans); |
|
147 |
customFeature.setDefaultGeometry(reproj_geom); |
|
148 |
feature = customFeature; |
|
149 |
} |
|
150 |
// ================================================ |
|
151 |
writer.write(feature); |
|
152 |
} |
|
153 |
|
|
154 |
if (this.taskStatus.isCancellationRequested()) { |
|
155 |
return; |
|
156 |
} |
|
157 |
featureCount++; |
|
158 |
} |
|
159 |
writer.close(); |
|
160 |
|
|
161 |
finishAction(this.options.getOutputFile().getName(), this.options.getOutputFile(), this.options.getTargetProjection()); |
|
162 |
taskStatus.message("Exportation finished"); |
|
163 |
|
|
164 |
} catch (Exception e) { |
|
165 |
logger.warn("Can't export data.", e); |
|
166 |
taskStatus.message("Problems exporting data"); |
|
167 |
throw new ExporttoServiceException(e); |
|
168 |
|
|
169 |
} finally { |
|
170 |
DisposeUtils.disposeQuietly(it); |
|
171 |
DisposeUtils.disposeQuietly(featureSet); |
|
172 |
this.taskStatus.terminate(); |
|
173 |
this.taskStatus.remove(); |
|
174 |
} |
|
175 |
} |
|
176 |
|
|
177 |
protected void finishAction(String layerName, File out_file, IProjection proj) |
|
178 |
throws ExporttoServiceException { |
|
179 |
|
|
180 |
if (exporttoServiceFinishAction != null) { |
|
181 |
/* |
|
182 |
* Export is done. We notify with a SHPStoreParameters, |
|
183 |
* not with the NewSHPParameters we have used: |
|
184 |
*/ |
|
185 |
DataStoreParameters las_params = null; |
|
186 |
|
|
187 |
try { |
|
188 |
las_params = DALLocator.getDataManager().createStoreParameters(JGrassLASDataStoreProvider.NAME); |
|
189 |
las_params.setDynValue("file", out_file); |
|
190 |
las_params.setDynValue("CRS", proj); |
|
191 |
|
|
192 |
las_params.validate(); |
|
193 |
} catch (Exception e) { |
|
194 |
throw new ExporttoServiceException(e); |
|
195 |
} |
|
196 |
exporttoServiceFinishAction.finished(layerName, las_params); |
|
197 |
} |
|
198 |
} |
|
199 |
|
|
200 |
public void setFinishAction( |
|
201 |
ExporttoServiceFinishAction exporttoServiceFinishAction) { |
|
202 |
this.exporttoServiceFinishAction = exporttoServiceFinishAction; |
|
203 |
} |
|
204 |
|
|
205 |
/** |
|
206 |
* Incomplete implementation of editable feature, only used to feed |
|
207 |
* reprojected features to the LAS Writer |
|
208 |
* |
|
209 |
* @author cesar |
|
210 |
* |
|
211 |
*/ |
|
212 |
protected class CustomFeatureImpl implements Feature { |
|
213 |
private Feature feature; |
|
214 |
private Geometry theGeom; |
|
215 |
private String defaultGeomName; |
|
216 |
private int defaultGeomIndex; |
|
217 |
|
|
218 |
public CustomFeatureImpl(Feature feat) { |
|
219 |
this.feature = feat; |
|
220 |
this.defaultGeomName = feat.getType().getDefaultGeometryAttributeName(); |
|
221 |
this.defaultGeomIndex = feat.getType().getDefaultGeometryAttributeIndex(); |
|
222 |
} |
|
223 |
|
|
224 |
public FeatureReference getReference() { |
|
225 |
throw new UnsupportedOperationException(); |
|
226 |
} |
|
227 |
|
|
228 |
public FeatureType getType() { |
|
229 |
return feature.getType(); |
|
230 |
} |
|
231 |
|
|
232 |
public Feature getCopy() { |
|
233 |
CustomFeatureImpl copy = new CustomFeatureImpl(feature.getCopy()); |
|
234 |
copy.setDefaultGeometry(theGeom); |
|
235 |
return copy; |
|
236 |
} |
|
237 |
|
|
238 |
public void validate(int mode) throws DataException { |
|
239 |
feature.validate(mode); |
|
240 |
} |
|
241 |
public EditableFeature getEditable() { |
|
242 |
return feature.getEditable(); |
|
243 |
} |
|
244 |
public Object get(String name) { |
|
245 |
if (name.equals(defaultGeomName) && theGeom!=null) { |
|
246 |
return theGeom; |
|
247 |
} |
|
248 |
return feature.get(name); |
|
249 |
} |
|
250 |
public Object get(int index) { |
|
251 |
if (index==defaultGeomIndex && theGeom!=null) { |
|
252 |
return theGeom; |
|
253 |
} |
|
254 |
return feature.get(index); |
|
255 |
} |
|
256 |
public int getInt(String name) { |
|
257 |
return feature.getInt(name); |
|
258 |
} |
|
259 |
public int getInt(int index) { |
|
260 |
return feature.getInt(index); |
|
261 |
} |
|
262 |
public boolean getBoolean(String name) { |
|
263 |
return feature.getBoolean(name); |
|
264 |
} |
|
265 |
public boolean getBoolean(int index) { |
|
266 |
return feature.getBoolean(index); |
|
267 |
} |
|
268 |
public long getLong(String name) { |
|
269 |
return feature.getLong(name); |
|
270 |
} |
|
271 |
public long getLong(int index) { |
|
272 |
return feature.getLong(index); |
|
273 |
} |
|
274 |
public float getFloat(String name) { |
|
275 |
return feature.getFloat(name); |
|
276 |
} |
|
277 |
public float getFloat(int index) { |
|
278 |
return feature.getFloat(index); |
|
279 |
} |
|
280 |
public double getDouble(String name) { |
|
281 |
return feature.getDouble(name); |
|
282 |
} |
|
283 |
public double getDouble(int index) { |
|
284 |
return feature.getDouble(index); |
|
285 |
} |
|
286 |
public Date getDate(String name) { |
|
287 |
return feature.getDate(name); |
|
288 |
} |
|
289 |
public Date getDate(int index) { |
|
290 |
return feature.getDate(index); |
|
291 |
} |
|
292 |
public String getString(String name) { |
|
293 |
return feature.getString(name); |
|
294 |
} |
|
295 |
public String getString(int index) { |
|
296 |
return feature.getString(index); |
|
297 |
} |
|
298 |
public byte getByte(String name) { |
|
299 |
return feature.getByte(name); |
|
300 |
} |
|
301 |
public byte getByte(int index) { |
|
302 |
return feature.getByte(index); |
|
303 |
} |
|
304 |
public Geometry getGeometry(String name) { |
|
305 |
if (name.equals(this.defaultGeomName) && theGeom!=null) { |
|
306 |
return theGeom; |
|
307 |
} |
|
308 |
return feature.getGeometry(name); |
|
309 |
} |
|
310 |
public Geometry getGeometry(int index) { |
|
311 |
if (index==defaultGeomIndex && theGeom!=null) { |
|
312 |
return theGeom; |
|
313 |
} |
|
314 |
return feature.getGeometry(index); |
|
315 |
} |
|
316 |
public Object[] getArray(String name) { |
|
317 |
return feature.getArray(name); |
|
318 |
} |
|
319 |
public Object[] getArray(int index) { |
|
320 |
return feature.getArray(index); |
|
321 |
} |
|
322 |
public Feature getFeature(String name) { |
|
323 |
return feature.getFeature(name); |
|
324 |
} |
|
325 |
public Feature getFeature(int index) { |
|
326 |
return feature.getFeature(index); |
|
327 |
} |
|
328 |
public Envelope getDefaultEnvelope() { |
|
329 |
return feature.getDefaultEnvelope(); |
|
330 |
} |
|
331 |
public Geometry getDefaultGeometry() { |
|
332 |
if (theGeom!=null) { |
|
333 |
return theGeom; |
|
334 |
} |
|
335 |
return feature.getDefaultGeometry(); |
|
336 |
} |
|
337 |
public void setDefaultGeometry(Geometry geom) { |
|
338 |
this.theGeom = geom; |
|
339 |
} |
|
340 |
public List getGeometries() { |
|
341 |
throw new UnsupportedOperationException(); |
|
342 |
} |
|
343 |
public IProjection getDefaultSRS() { |
|
344 |
return feature.getDefaultSRS(); |
|
345 |
} |
|
346 |
public List getSRSs() { |
|
347 |
return feature.getSRSs(); |
|
348 |
} |
|
349 |
public Instant getInstant(int index) { |
|
350 |
return feature.getInstant(index); |
|
351 |
} |
|
352 |
public Instant getInstant(String name) { |
|
353 |
return feature.getInstant(name); |
|
354 |
} |
|
355 |
public Interval getInterval(int index) { |
|
356 |
return feature.getInterval(index); |
|
357 |
} |
|
358 |
public Interval getInterval(String name) { |
|
359 |
return feature.getInterval(name); |
|
360 |
} |
|
361 |
public DynObject getAsDynObject() { |
|
362 |
return feature.getAsDynObject(); |
|
363 |
} |
|
364 |
public EvaluatorData getEvaluatorData() { |
|
365 |
return feature.getEvaluatorData(); |
|
366 |
} |
|
367 |
|
|
368 |
public FeatureStore getStore() { |
|
369 |
return feature.getStore(); |
|
370 |
} |
|
371 |
} |
|
372 |
|
|
373 |
|
|
374 |
} |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/java/org/gvsig/exportto/swing/prov/lidar/ExporttoLASProviderFactory.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2016 gvSIG Association. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or modify it under |
|
7 |
* the terms of the GNU General Public License as published by the Free Software |
|
8 |
* Foundation; either version 3 of the License, or (at your option) any later |
|
9 |
* version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
|
14 |
* details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License along with |
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51 |
|
18 |
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
19 |
* |
|
20 |
* For any additional information, do not hesitate to contact us at info AT |
|
21 |
* gvsig.com, or visit our website www.gvsig.com. |
|
22 |
*/ |
|
23 |
package org.gvsig.exportto.swing.prov.lidar; |
|
24 |
|
|
25 |
import org.cresques.cts.IProjection; |
|
26 |
import org.gvsig.exportto.swing.ExporttoSwingManager; |
|
27 |
import org.gvsig.exportto.swing.spi.AbstractExporttoProviderFactory; |
|
28 |
import org.gvsig.fmap.dal.feature.FeatureStore; |
|
29 |
import org.gvsig.i18n.Messages; |
|
30 |
import org.gvsig.tools.dynobject.DynObject; |
|
31 |
import org.gvsig.tools.service.ServiceException; |
|
32 |
import org.gvsig.tools.service.spi.Provider; |
|
33 |
import org.gvsig.tools.service.spi.ProviderServices; |
|
34 |
|
|
35 |
/** |
|
36 |
* Factory of file {@link ExportoProvider} objects. |
|
37 |
* |
|
38 |
* @author <a href="mailto:cmartinez@scolab.es">Cesar Martinez Izquierdo</a> |
|
39 |
*/ |
|
40 |
public class ExporttoLASProviderFactory extends |
|
41 |
AbstractExporttoProviderFactory { |
|
42 |
|
|
43 |
private static final String PROVIDER_NAME = "LAS"; |
|
44 |
|
|
45 |
public ExporttoLASProviderFactory() { |
|
46 |
super(new int[]{ |
|
47 |
ExporttoSwingManager.VECTORIAL_TABLE_WITHOUT_GEOMETRY, |
|
48 |
ExporttoSwingManager.VECTORIAL_TABLE_WITH_GEOMETRY}); |
|
49 |
} |
|
50 |
|
|
51 |
public String getName() { |
|
52 |
return PROVIDER_NAME; |
|
53 |
} |
|
54 |
|
|
55 |
public String getDescription() { |
|
56 |
return Messages.getText("general_exporter_description", |
|
57 |
new String[]{"LAS file"}); |
|
58 |
} |
|
59 |
|
|
60 |
public String getLabel() { |
|
61 |
return Messages.getText("general_exporter_label", |
|
62 |
new String[]{"LAS file"}); |
|
63 |
} |
|
64 |
|
|
65 |
|
|
66 |
public Provider create(DynObject parameters, ProviderServices services) throws ServiceException { |
|
67 |
return new ExporttoLASProvider(services, |
|
68 |
(FeatureStore) parameters.getDynValue(PARAMETER_FEATURESTORE), |
|
69 |
(IProjection) parameters.getDynValue(PARAMETER_PROJECTION)); |
|
70 |
} |
|
71 |
|
|
72 |
} |
org.gvsig.lidar/tags/org.gvsig.lidar-1.0.20/org.gvsig.lidar.app/org.gvsig.lidar.app.export/src/main/java/org/gvsig/exportto/swing/panel/SelectEnvelopePanel.java | ||
---|---|---|
1 |
/** |
|
2 |
* gvSIG. Desktop Geographic Information System. |
|
3 |
* |
|
4 |
* Copyright (C) 2016 gvSIG Association. |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or modify it under |
|
7 |
* the terms of the GNU General Public License as published by the Free Software |
|
8 |
* Foundation; either version 3 of the License, or (at your option) any later |
|
9 |
* version. |
|
10 |
* |
|
11 |
* This program is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
|
13 |
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more |
|
14 |
* details. |
|
15 |
* |
|
16 |
* You should have received a copy of the GNU General Public License along with |
|
17 |
* this program; if not, write to the Free Software Foundation, Inc., 51 |
Also available in: Unified diff