Skip to content

Commit

Permalink
Resolve #1446 (#1447)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgillies committed Aug 29, 2018
1 parent 821f992 commit 41bbc36
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rasterio/_warp.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _transform_geom(
# Transform options.
valb = str(antimeridian_offset).encode('utf-8')
options = CSLSetNameValue(options, "DATELINEOFFSET", <const char *>valb)
if antimeridian_cutting:
if antimeridian_cutting and geom['type'] != "Point":
options = CSLSetNameValue(options, "WRAPDATELINE", "YES")

try:
Expand Down
10 changes: 10 additions & 0 deletions tests/test_warp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import rasterio
from rasterio.control import GroundControlPoint
from rasterio.crs import CRS
from rasterio.enums import Resampling
from rasterio.env import GDALVersion
from rasterio.errors import (
Expand Down Expand Up @@ -1321,3 +1322,12 @@ def test_issue1350():

for i in range(1, len(reprojected)):
assert not (reprojected[0] == reprojected[i]).all()


def test_issue_1446():
"""Confirm resolution of #1446"""
g = transform_geom(
CRS.from_epsg(4326), CRS.from_epsg(32610),
{'type': 'Point', 'coordinates': (-122.51403808499907, 38.06106733107932)})
assert round(g['coordinates'][0], 1) == 542630.9
assert round(g['coordinates'][1], 1) == 4212702.1

0 comments on commit 41bbc36

Please sign in to comment.