Opened 14 years ago

Closed 14 years ago

#640 closed defect (invalid)

ST_SetPixelSize behaving unpredictably

Reported by: robe Owned by: pracine
Priority: medium Milestone: PostGIS 2.0.0
Component: raster Version: master
Keywords: Cc:

Description

Okay perhaps it is my misunderstanding.

I have 2 elephants — one I brought in whole and one I chopped into pieces.

-- we let this one live
python gdal2raster.py -r pele.png -I -t ch13.pele -o pele.sql

- we sacrifice this one
python gdal2raster.py -r pele.png -I -k 50x50 -t ch13.pele_chunked -o pele_chunked.sql

Both come in upside down, which I assume is becasue I imported with gdal 1.6. No problem.

— run this command

UPDATE ch13.pele SET rast = ST_SetPixelSize(rast,1,-1);
UPDATE ch13.pele_chunked SET rast = ST_SetPixelSize(rast,1,-1);

The single row whole one flips over correctly to line up with the image as I expect. The second one just shifts down one row.

I would have expected the sacrificed elephant to also line up with the image after flipping.

See attached files.

Attachments (3)

firetest.zip (460.7 KB ) - added by robe 14 years ago.
pele_chunkedpoly_beforeflip.png (42.8 KB ) - added by robe 14 years ago.
before
pele_chunkedpoly_afterflip.png (77.3 KB ) - added by robe 14 years ago.
after flip

Download all attachments as: .zip

Change History (4)

by robe, 14 years ago

Attachment: firetest.zip added

by robe, 14 years ago

before

by robe, 14 years ago

after flip

comment:1 by robe, 14 years ago

Resolution: invalid
Status: newclosed

On closer inspection, I think this is just my misunderstanding. It seems that each tile is being flipped separately is all which makes perfect sense now that I think about it. I did a polygonize of each. I guess I have to change the upperleftx and upperlefty of each.

See attached.

Note: See TracTickets for help on using tickets.