Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Plio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aflab
astrogeology
Plio
Commits
c1a59a00
Commit
c1a59a00
authored
6 years ago
by
jay
Browse files
Options
Downloads
Patches
Plain Diff
Fixes version and north up
parent
7b3a5bb7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
plio/__init__.py
+15
-1
15 additions, 1 deletion
plio/__init__.py
plio/io/io_gdal.py
+5
-4
5 additions, 4 deletions
plio/io/io_gdal.py
setup.py
+1
-4
1 addition, 4 deletions
setup.py
with
21 additions
and
9 deletions
plio/__init__.py
+
15
−
1
View file @
c1a59a00
__version__
=
"
0.1.2
"
from
pkg_resources
import
get_distribution
,
DistributionNotFound
import
os.path
try
:
_dist
=
get_distribution
(
'
plio
'
)
# Normalize case for Windows systems
dist_loc
=
os
.
path
.
normcase
(
_dist
.
location
)
here
=
os
.
path
.
normcase
(
__file__
)
if
not
here
.
startswith
(
os
.
path
.
join
(
dist_loc
,
'
plio
'
)):
# not installed, but there is another version that *is*
raise
DistributionNotFound
except
DistributionNotFound
:
__version__
=
'
Please install this project with setup.py
'
else
:
__version__
=
_dist
.
version
# Submodule imports
# Submodule imports
from
.
import
io
from
.
import
io
...
...
This diff is collapsed.
Click to expand it.
plio/io/io_gdal.py
+
5
−
4
View file @
c1a59a00
...
@@ -227,6 +227,7 @@ class GeoDataset(object):
...
@@ -227,6 +227,7 @@ class GeoDataset(object):
@property
@property
def
north_up
(
self
):
def
north_up
(
self
):
return
True
if
self
.
footprint
:
if
self
.
footprint
:
return
geofuncs
.
is_clockwise
(
json
.
loads
(
self
.
footprint
.
ExportToJson
())[
'
coordinates
'
][
0
][
0
])
return
geofuncs
.
is_clockwise
(
json
.
loads
(
self
.
footprint
.
ExportToJson
())[
'
coordinates
'
][
0
][
0
])
else
:
else
:
...
@@ -496,15 +497,15 @@ class GeoDataset(object):
...
@@ -496,15 +497,15 @@ class GeoDataset(object):
if
not
pixels
:
if
not
pixels
:
array
=
band
.
ReadAsArray
().
astype
(
dtype
)
array
=
band
.
ReadAsArray
().
astype
(
dtype
)
if
self
.
north_up
==
False
:
#
if self.north_up == False:
array
=
np
.
flipud
(
array
)
#
array = np.flipud(array)
else
:
else
:
# Check that the read start is not outside of the image
# Check that the read start is not outside of the image
xstart
,
ystart
,
xcount
,
ycount
=
pixels
xstart
,
ystart
,
xcount
,
ycount
=
pixels
xmax
,
ymax
=
map
(
int
,
self
.
xy_extent
[
1
])
xmax
,
ymax
=
map
(
int
,
self
.
xy_extent
[
1
])
# If the image is south up, flip the roi
# If the image is south up, flip the roi
if
self
.
north_up
==
False
:
#
if self.north_up == False:
ystart
=
ymax
-
(
ystart
+
ycount
)
#
ystart = ymax - (ystart + ycount)
if
xstart
<
0
:
if
xstart
<
0
:
xstart
=
0
xstart
=
0
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
4
View file @
c1a59a00
...
@@ -6,9 +6,6 @@ from plio.examples import available
...
@@ -6,9 +6,6 @@ from plio.examples import available
with
open
(
'
README.rst
'
,
'
r
'
)
as
f
:
with
open
(
'
README.rst
'
,
'
r
'
)
as
f
:
long_description
=
f
.
read
()
long_description
=
f
.
read
()
VERSION
=
plio
.
__version__
def
setup_package
():
def
setup_package
():
examples
=
set
()
examples
=
set
()
for
i
in
available
():
for
i
in
available
():
...
@@ -23,7 +20,7 @@ def setup_package():
...
@@ -23,7 +20,7 @@ def setup_package():
setup
(
setup
(
name
=
"
plio
"
,
name
=
"
plio
"
,
version
=
VERSION
,
version
=
'
0.1.2
'
,
author
=
"
Jay Laura
"
,
author
=
"
Jay Laura
"
,
author_email
=
"
jlaura@usgs.gov
"
,
author_email
=
"
jlaura@usgs.gov
"
,
description
=
(
"
I/O API to support planetary data formats.
"
),
description
=
(
"
I/O API to support planetary data formats.
"
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment