geotiffjs / geotiff.js

geotiff.js is a small library to parse TIFF files for visualization or analysis. It is written in pure JavaScript, and is usable in both the browser and node.js applications.
https://geotiffjs.github.io/
MIT License
845 stars 175 forks source link

Writing GeoTiffs #401

Closed gabebautista11 closed 9 months ago

gabebautista11 commented 9 months ago

Hey Im trying to write a new geotiff that covers the same area and pixel size as my original geotiff. What Tiff options will I have to to set I don't understand all the keys I need. When I try setting GeoOrgin to set the top left and the GeoScale to set the size of the pixels I get these errors. Any help will be greatly appreciated.

GeoScale not in name2code: [ 'NewSubfileType', 'SubfileType', 'ImageWidth', 'ImageLength', 'BitsPerSample', 'Compression', 'PhotometricInterpretation', 'Threshholding', 'CellWidth', 'CellLength', 'FillOrder', 'DocumentName', 'ImageDescription', 'Make', 'Model', 'StripOffsets', 'Orientation', 'SamplesPerPixel', 'RowsPerStrip', 'StripByteCounts', 'MinSampleValue', 'MaxSampleValue', 'XResolution', 'YResolution', 'PlanarConfiguration', 'PageName', 'XPosition', 'YPosition', 'FreeOffsets', 'FreeByteCounts', 'GrayResponseUnit', 'GrayResponseCurve', 'T4Options', 'T6Options', 'ResolutionUnit', 'PageNumber', 'TransferFunction', 'Software', 'DateTime', 'Artist', 'HostComputer', 'Predictor', 'WhitePoint', 'PrimaryChromaticities', 'ColorMap', 'HalftoneHints', 'TileWidth', 'TileLength', 'TileOffsets', 'TileByteCounts', 'BadFaxLines', 'CleanFaxData', 'ConsecutiveBadFaxLines', 'SubIFDs', 'DotRange', 'ExtraSamples', 'SampleFormat', 'SMinSampleValue', 'SMaxSampleValue', 'ClipPath', 'XClipPathUnits', 'YClipPathUnits', 'Indexed', 'JPEGTables', 'Decode', 'DefaultImageColor', 'YCbCrCoefficients', 'YCbCrSubSampling', 'YCbCrPositioning', 'ReferenceBlackWhite', 'StripRowCounts', 'XMP', 'Copyright', 'ExposureTime', 'FNumber', 'ModelPixelScale', 'IPTC', 'ModelTiepoint', 'ModelTransformation', 'Photoshop', 'Exif IFD', 'ICC Profile', 'GeoKeyDirectory', 'GeoDoubleParams', 'GeoAsciiParams', 'ExifVersion', 'DateTimeOriginal', 'DateTimeDigitized', 'ShutterSpeedValue', 'ApertureValue', 'LightSource', 'Flash', 'MakerNote', 'UserComment', 'FlashpixVersion', 'ColorSpace', 'FileSource', 'ImageUniqueID', 'GDAL_METADATA', 'GDAL_NODATA', ... 48 more items ]

gabebautista11 commented 9 months ago

also is there a way I can see all the name2code params.

gabebautista11 commented 9 months ago

image

right now im doing this. I am getting a super stretched image that is wayyyy to large.

gabebautista11 commented 9 months ago

Hey, I solved my problem I found another issue on here that helpe me out a lot.

https://github.com/geotiffjs/geotiff.js/issues/294