Coder Social home page Coder Social logo

imgkap's Introduction

imgkap 1.16

Tool to manipuate raster nautical charts in KAP format

Build Status

This repository is a Github clone of the original code created by M'dJ in 2011 and maintained by Pavel Kalian

Usage

imgkap [option] [inputfile] [lat0 lon0 [x0;y0] lat1 lon1 [x1;y1] | headerfile] [outputfile]

Usage of imgkap Version 1.16 by M'dJ + H.N

Convert kap to img :
  >imgkap mykap.kap myimg.png
    -convert mykap into myimg.png
  >imgkap mykap.kap mheader.kap myimg.png
    -convert mykap into header myheader (only text file) and myimg.png

Convert img to kap :
  >imgkap myimg.png myheaderkap.kap
    -convert myimg.png into myresult.kap using myheader.kap for kap informations
  >imgkap mykap.png lat0 lon0 lat1 lon1 myresult.kap
    -convert myimg.png into myresult.kap using WGS84 positioning
  >imgkap mykap.png lat0 lon0 x0;y0 lat1 lon1 x1;y1 myresult.kap
    -convert myimg.png into myresult.kap
  >imgkap -s 'LOWEST LOW WATER' myimg.png lat0 lon0 lat1 lon2 -f
    -convert myimg.png into myimg.kap using WGS84 positioning and options

Convert kml to kap :
  >imgkap mykml.kml
    -convert GroundOverlay mykml file into kap file using name and dir of image
  >imgkap mykml.kml mykap.kap
    -convert GroundOverlay mykml into mykap file

WGS84 positioning :
	lat0 lon0 is a left or right,top point
	lat1 lon1 is a right or left,bottom point cater-cornered to lat0 lon0
	lat to be between -85 and +85 degree
	lon to be between -180 and +180 degree
	    different formats are accepted : -1.22  1°10'20.123N  -1d22.123 ...
	x;y pixel points can be used if lat lon defines not the image edges.
	    lat0 lon0 x0;y0 must be in the left or right, upper third
	    lat1 lon1 x1;y1 must be in the right or left, lower third
Options :
	-w  : no image size extension to WGS84 because image is already WGS84
	-r x0f;y0f-x1f;y1f  "2 pixel points -> 4 * PLY"
	    : define a rectangle area in the image visible from the .kap
	-r x0f;y0f-x1f;y1f-x2f;y2f-x3f;y3f... "3 to 12 pixel points -> PLY"
	    : define a up to 12 edges polygon visible from the .kap
	-n  : Force compatibility all KAP software, max 127 colors
	-c  : reduce colors of image to 127 colors / for test purposes only
	-f  : fix units to FATHOMS
	-e  : fix units to FEET
	-s name : fix sounding datum
	-t title : change name of map
	-j projection : change projection of map (Default: MERCATOR)
	-d datum : change geographic datum of map (Default: WGS84)
	-l scale : Override the calculated scale, 1:<SCALE> (Default: automatically calculated from the image size and geographic extent)
	-p color : color of map
	   color (Kap to image) : ALL|RGB|DAY|DSK|NGT|NGR|GRY|PRC|PRG
	     ALL generate multipage image, use only with GIF or TIF
	   color (image or Kap to Kap) :  NONE|KAP|MAP|IMG
	     NONE use colors in image file, default
	     KAP only width KAP or header file, use RGB tag in KAP file
	     MAP generate DSK and NGB colors for map scan
	       < 64 colors: Black -> Gray, White -> Black
	     IMG generate DSK and NGB colors for image (photo, satellite...)

imgkap's People

Contributors

hein-nebel avatar nohal avatar seandepagnier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

imgkap's Issues

Integration with Weather_fax

Pavel, would it be possible to integrat this into Weatherfax, so that we can convert image files into kap files which contain lat/long? and visa versa (not as much use however)?

It might be best if Weatherfax were to use Kap files as its base format, and simply convert the weatherfax files upon download into kap, but that would depend on having an accurate weatherfax.xml database...

Anyway how hard would this be to do?

Licence

Hello,

I find this tool useful — I thank you for it — and I would like to make and eventually maintain a package for Arch Linux.
Do you mind ? Is this software GPLv2 ?

libimgkap?

In the source there is reference to a libimgkap for using in other applications - is this still possible?

ERROR - internal GetPalette \nERROR - imgkap ((null)) return 2

I generated tiles with a tileserver to 10240x10240 (16 million colordepth) pixel png's and want to convert the resulting png to .kap-files for usage in OpenCPN.
Of the 224 large png's, that cover the Netherlands, two of them make imgkap crash with the above ERROR-message.

I tried "fixing" the png's by converting them to bmp and back but the resulting files still crash so I guess it must be something in imgkap that overflowes because of the large number of colors in the png (28794 in one of the png's).

I can deliver the png for testing if you want?! You can mail me at [email protected]

wpx,wpy parameters

I noticed that the polynomial parameters wpx and wpy and their reverses are not printed in the resulting KAP-files, but have the 'to do' status (in the code). Would be nice if someone could add these parameters to imgkap. I have the algoritms but I'm not a c-programmer and cannot contribute myself

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.