Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
New upstream version 2.1.0~rc2+ds
· c5eeda18
Bas Couwenberg
authored
Oct 31, 2018
c5eeda18
New upstream version 2.1.0~rc3+ds
· 8ce7620c
Bas Couwenberg
authored
Nov 01, 2018
8ce7620c
Expand all
Show whitespace changes
Inline
Side-by-side
PKG-INFO
View file @
8ce7620c
Metadata-Version: 1.2
Name: PDAL
Version: 2.1.0rc
1
Version: 2.1.0rc
3
Summary: Point cloud data processing
Home-page: http://pdal.io
Author: Howard Butler
...
...
VERSION.txt
View file @
8ce7620c
2.1.0rc1
\ No newline at end of file
2.1.0rc3
\ No newline at end of file
pdal/PyPipeline.cpp
View file @
8ce7620c
...
...
@@ -47,6 +47,7 @@
#include
"PyArray.hpp"
#include
<pdal/Stage.hpp>
#include
<pdal/pdal_features.hpp>
#include
<pdal/PipelineWriter.hpp>
#include
<pdal/io/NumpyReader.hpp>
...
...
@@ -78,6 +79,7 @@ Pipeline::Pipeline(std::string const& json, std::vector<Array*> arrays)
if
(
!
r
)
throw
pdal
::
pdal_error
(
"pipeline had no stages!"
);
#if PDAL_VERSION_MAJOR > 1 || PDAL_VERSION_MINOR >=8
int
counter
=
1
;
for
(
auto
array
:
arrays
)
{
...
...
@@ -102,6 +104,7 @@ Pipeline::Pipeline(std::string const& json, std::vector<Array*> arrays)
counter
++
;
}
#endif
manager
.
validateStageOptions
();
}
...
...
pdal/__init__.py
View file @
8ce7620c
__version__
=
'
2.1.0rc
1
'
__version__
=
'
2.1.0rc
3
'
from
.pipeline
import
Pipeline
from
.array
import
Array
from
.dimension
import
dimensions
from
pdal.libpdalpython
import
getVersionString
,
getVersionMajor
,
getVersionMinor
,
getVersionPatch
,
getSha1
,
getDebugInformation
,
getPluginInstallPath
class
Info
(
object
):
version
=
getVersionString
()
major
=
getVersionMajor
()
minor
=
getVersionMinor
()
patch
=
getVersionPatch
()
debug
=
getDebugInformation
()
sha1
=
getSha1
()
plugin
=
getPluginInstallPath
()
info
=
Info
()
pdal/libpdalpython.cpp
View file @
8ce7620c
This diff is collapsed.
Click to expand it.
pdal/libpdalpython.pyx
View file @
8ce7620c
...
...
@@ -12,6 +12,30 @@ np.import_array()
from
cpython
cimport
PyObject
,
Py_INCREF
from
cython.operator
cimport
dereference
as
deref
,
preincrement
as
inc
cdef
extern
from
"
pdal/pdal_config.hpp
"
namespace
"
pdal::Config
"
:
cdef
int
versionMajor
()
except
+
cdef
int
versionMinor
()
except
+
cdef
int
versionPatch
()
except
+
cdef
string
sha1
()
except
+
cdef
string
debugInformation
()
except
+
cdef
string
pluginInstallPath
()
except
+
cdef
string
versionString
()
except
+
def
getVersionString
():
return
versionString
()
def
getVersionMajor
():
return
versionMajor
()
def
getVersionMinor
():
return
versionMinor
()
def
getVersionPatch
():
return
versionPatch
()
def
getSha1
():
return
sha1
()
def
getDebugInformation
():
return
debugInformation
()
def
getPluginInstallPath
():
return
pluginInstallPath
()
cdef
extern
from
"
PyArray.hpp
"
namespace
"
pdal::python
"
:
cdef
cppclass
Array
:
...
...
@@ -32,6 +56,8 @@ cdef extern from "PyPipeline.hpp" namespace "libpdalpython":
int
getLogLevel
()
void
setLogLevel
(
int
)
cdef
class
PyArray
:
cdef
Array
*
thisptr
def
__cinit__
(
self
,
object
array
):
...
...
setup.py
View file @
8ce7620c
...
...
@@ -108,13 +108,9 @@ libraries = []
extra_link_args
=
[]
extra_compile_args
=
[]
if
os
.
name
in
[
'
nt
'
]:
library_dirs
=
[
'
c:/OSGeo4W64/lib
'
]
libraries
=
[
'
pdalcpp
'
,
'
pdal_plugin_reader_numpy
'
,
'
pdal_util
'
,
'
ws2_32
'
]
extra_compile_args
=
[
'
/DNOMINMAX
'
,]
from
setuptools.extension
import
Extension
as
DistutilsExtension
PDALVERSION
=
None
if
pdal_config
and
"
clean
"
not
in
sys
.
argv
:
# Collect other options from PDAL
try
:
...
...
@@ -134,6 +130,7 @@ if pdal_config and "clean" not in sys.argv:
# older versions of pdal-config do not include --python-version switch
except
ValueError
:
pass
PDALVERSION
=
Version
(
get_pdal_config
(
'
--version
'
))
separator
=
'
:
'
if
os
.
name
in
[
'
nt
'
]:
...
...
@@ -162,7 +159,19 @@ if DEBUG:
if
os
.
name
!=
'
nt
'
:
extra_compile_args
+=
[
'
-g
'
,
'
-O0
'
]
if
os
.
name
in
[
'
nt
'
]:
if
os
.
environ
[
'
OSGEO4W_ROOT
'
]:
library_dirs
=
[
'
c:/OSGeo4W64/lib
'
]
libraries
=
[
'
pdalcpp
'
,
'
pdal_util
'
,
'
ws2_32
'
]
if
PDALVERSION
>=
Version
(
'
1.8
'
):
libraries
.
append
(
'
pdal_plugin_reader_numpy
'
)
extra_compile_args
=
[
'
/DNOMINMAX
'
,]
# readers.numpy doesn't exist until PDAL 1.8
if
PDALVERSION
>=
Version
(
'
1.8
'
):
libraries
.
append
(
'
pdal_plugin_reader_numpy
'
)
sources
=
[
'
pdal/libpdalpython
'
+
ext
,
"
pdal/PyPipeline.cpp
"
]
extensions
=
[
DistutilsExtension
(
"
*
"
,
sources
,
...
...
test/test_pipeline.py
View file @
8ce7620c
...
...
@@ -2,6 +2,7 @@ import unittest
import
pdal
import
os
import
numpy
as
np
from
packaging.version
import
Version
DATADIRECTORY
=
"
./test/data
"
...
...
@@ -127,8 +128,12 @@ class TestPipeline(PDALTest):
#
class
TestArrayLoad
(
PDALTest
):
@unittest.skipUnless
(
os
.
path
.
exists
(
os
.
path
.
join
(
DATADIRECTORY
,
'
perlin.npy
'
)),
"
missing test data
"
)
def
test_merged_arrays
(
self
):
"""
Can we load data from a a list of arrays to PDAL
"""
if
Version
(
pdal
.
info
.
version
)
<
Version
(
'
1.8
'
):
return
True
data
=
np
.
load
(
os
.
path
.
join
(
DATADIRECTORY
,
'
perlin.npy
'
))
arrays
=
[
data
,
data
,
data
]
...
...
@@ -157,6 +162,9 @@ class TestDimensions(PDALTest):
def
test_fetch_dimensions
(
self
):
"""
Ask PDAL for its valid dimensions list
"""
dims
=
pdal
.
dimensions
if
Version
(
pdal
.
info
.
version
)
<
Version
(
'
1.8
'
):
self
.
assertEqual
(
len
(
dims
),
71
)
else
:
self
.
assertEqual
(
len
(
dims
),
72
)
def
test_suite
():
...
...