1

Topic: GDAL API A C ++

And there is at a forum who works with this cartographical library? It is necessary to transform tiff in geoTiff with known GCP. Examples are by fits and full pipeline  it does not turn out yet.

2

Re: GDAL API A C ++

Hello, Serpuh, you wrote: S> And there is at a forum who works with this cartographical library? It is necessary to transform tiff in geoTiff with known GCP. Examples are by fits and full pipeline  it does not turn out yet. GeoTiff is "anchored" TIFF with conversion and coordinate system? http://www.gdal.org/warptut.html - like here all is. For initial Tiff to cause SetGCPs, then to create new Tiff and to make Warp from initial in the new.

3

Re: GDAL API A C ++

4

Re: GDAL API A C ++

Hello, Serpuh, you wrote: S> How to specify correctly projections ( geographicRef) And what exactly it would be desirable to receive? If it is not necessary any specific coordinate system easier to take or normal WGS84, or  a projection (EPSG:3857) Well and if GCP-shchnye points are should be and coordinate system for them. OGRSpatialReference ref; ref.importFromEpsg (3857); char *pszDstWkt; ref.exportToWkt (&pszDstWkt); dataset-> SetProjection (pszDstWkt); S> as meters to translate in UTM, there like one in one, but there is certain scale factor 0.9996 UTM and so in meters. Also what for scale factor? S> double adfGeoTransform [6] = {TopLeftX, WidthResolution, 0, TopLeftY, 0, HeightResolution}; and parameters for SetGeoTransform - they whence undertook?

5

Re: GDAL API A C ++

Hello, nrwl, you wrote: N> And what exactly it would be desirable to receive? If it is not necessary any specific coordinate system easier to take or normal WGS84, or  (EPSG:3857) I while so specified a projection, geoTiff it turned out also the sizes from a screen ruler in QGIS like correct. geographicRef. SetWellKnownGeogCS ("WGS84"); geographicRef. SetUTM (37, true); N> UTM and so in meters. Also what for scale factor? PARAMETER ["scale_factor", 0.9996] gdalinfo.exe produces this . Thought can it is necessary manually the sizes in meters on it multiply. N> and parameters for SetGeoTransform - they whence undertook? 3D the model is anchored on EXIF GPS from pictures, torn on the North-south and on top is made  i.e. actually for each pixel its coordinate and height is known. But I while specify in SetGeoTransform UTM the upper point and the size  in terrains. Not in course, like it is possible on XYZ for a grid to anchor, that geoTiff was with a card of heights?

6

Re: GDAL API A C ++

Hello, Serpuh, you wrote: S> and the sizes from a screen ruler in QGIS like correct I for check would take some points with GPS in coordinates and looked where them QGis draws - if they on a raster there where it is necessary, all "was normally anchored". S> And here with zone UTM it is not clear, whether it is possible to translate means GDAL latitude longtitude in UTM a zone of type such? http://www.apsalin.com/utm-zone-finder.aspx as far as I know, ready in GDAL - is not present. Only if most to write. In Wikipedia  with zones is - https://en.wikipedia.org/wiki/Universal … ate_system At UTM normally the zone is registered and "on the fly" nobody changes it. S> PARAMETER ["scale_factor", 0.9996] gdalinfo.exe produces this . Thought can it is necessary manually the sizes in meters on it multiply. This parameter to all to coordinate system concerns. If it is necessary more details - it is necessary to light up conversion details in UTM. For units there other parameter - UNIT ["meter", 1...] . But all conversions of system in system should make GDAL/proj4. S> 3D the model is anchored on EXIF GPS from pictures, torn on the North-south and on top is made  i.e. actually for each pixel its coordinate and height is known. But I while specify in SetGeoTransform UTM the upper point and the size  in terrains. S> not in course, like it is possible on XYZ for a grid to anchor, that geoTiff was with a card of heights? As far as I know, GDAL with XYZ does not work for a raster. The binding - two-dimensional, there and parameters is not present for the third coordinate

7

Re: GDAL API A C ++

Hello, nrwl, you wrote: N> As far as I know, GDAL with XYZ does not work for a raster. The binding - two-dimensional, there and parameters is not present for the third coordinate Such code found, it is possible through GCP to set height. But if to set for example 1. Whether GCP the algorithm crashes down. GDAL_GCP *pasGCPs;...//1st point//Unique identifier, often numeric pasGCPs-> pszId = "0";//Informational message or "" pasGCPs-> pszInfo = NULL;//Pixel (x) location of GCP on raster pasGCPs-> dfGCPPixel = 0;//Line (y) location of GCP on raster pasGCPs-> dfGCPLine = 0;//X position of GCP in georeferenced space pasGCPs-> dfGCPX = 590000.000;//Y position of GCP in georeferenced space pasGCPs-> dfGCPY = 4928000.000;//Elevation of GCP, or zero if not known pasGCPs-> dfGCPZ = 0;... GDALSetGCPs (dst, GCP_count, pasGCPs, "WGS84");

8

Re: GDAL API A C ++

Hello, Serpuh, you wrote: S> Hello, nrwl, you wrote: N>> As far as I know, GDAL with XYZ does not work for a raster. The binding - two-dimensional, there and parameters is not present for the third coordinate S> Such code found, it is possible through GCP to set height. But if to set for example 1. Whether GCP the algorithm crashes down. https://en.wikipedia.org/wiki/World_file - GDAL as a result here such matrix makes. There the third coordinate there is no place to fasten. It is possible to look at what exactly they with the third coordinate from GCP do.