Converting GeoTIFF to GeoPackage
I've been searching around for a way to do this and I focused on GDAL for a while. Everything I see says to use gdal_translate. The executable.
But, I'm on Windows and there are several GDAL nuget packages available. Using the GDAL package I can open a file and read it ...
GdalConfiguration.ConfigureGdal();
Dataset ds = Gdal.Open(file, Access.GA_ReadOnly);
... but I don't just want to read it. I want to convert it to GeoPackage. I don't see gdal_translate, or anything that would lead me to believe it will translate. Can someone give me some guidance here? How can I do the translation?
Or, is using GDAL packages not the best way to do this? I picked GDAL because it seems to be widely used.
sqlite nuget gdal geotiff geopackage
add a comment |
I've been searching around for a way to do this and I focused on GDAL for a while. Everything I see says to use gdal_translate. The executable.
But, I'm on Windows and there are several GDAL nuget packages available. Using the GDAL package I can open a file and read it ...
GdalConfiguration.ConfigureGdal();
Dataset ds = Gdal.Open(file, Access.GA_ReadOnly);
... but I don't just want to read it. I want to convert it to GeoPackage. I don't see gdal_translate, or anything that would lead me to believe it will translate. Can someone give me some guidance here? How can I do the translation?
Or, is using GDAL packages not the best way to do this? I picked GDAL because it seems to be widely used.
sqlite nuget gdal geotiff geopackage
add a comment |
I've been searching around for a way to do this and I focused on GDAL for a while. Everything I see says to use gdal_translate. The executable.
But, I'm on Windows and there are several GDAL nuget packages available. Using the GDAL package I can open a file and read it ...
GdalConfiguration.ConfigureGdal();
Dataset ds = Gdal.Open(file, Access.GA_ReadOnly);
... but I don't just want to read it. I want to convert it to GeoPackage. I don't see gdal_translate, or anything that would lead me to believe it will translate. Can someone give me some guidance here? How can I do the translation?
Or, is using GDAL packages not the best way to do this? I picked GDAL because it seems to be widely used.
sqlite nuget gdal geotiff geopackage
I've been searching around for a way to do this and I focused on GDAL for a while. Everything I see says to use gdal_translate. The executable.
But, I'm on Windows and there are several GDAL nuget packages available. Using the GDAL package I can open a file and read it ...
GdalConfiguration.ConfigureGdal();
Dataset ds = Gdal.Open(file, Access.GA_ReadOnly);
... but I don't just want to read it. I want to convert it to GeoPackage. I don't see gdal_translate, or anything that would lead me to believe it will translate. Can someone give me some guidance here? How can I do the translation?
Or, is using GDAL packages not the best way to do this? I picked GDAL because it seems to be widely used.
sqlite nuget gdal geotiff geopackage
sqlite nuget gdal geotiff geopackage
edited Dec 12 '18 at 2:48
swatchai
2,83521424
2,83521424
asked Nov 19 '18 at 21:27
CorporalCuddlerCorporalCuddler
183
183
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
If you can't do it with GDAL, you'll probably not going to be able to do it with anything else, since C# GIS libraries (Sharpmap, MapWindow, DotSpatial, etc...) normally depend on GDAL.
That said, and since there's no C# implementation for gdal_translate:
https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps
That leaves you two alternatives:
- Implement the functionality you want. GDALwrite.cs would be a good start
https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/GDALWrite.cs
OR,
- Call gdal_translate.exe directly from C#, the same way we normally do with ogr2ogr.exe
https://gis.stackexchange.com/questions/143920/how-do-i-call-ogr2ogr-from-a-c-application
Note: GeoPackage support in GDAL requires the library to be compiled against libsqlite3. You'll have to check that on your nuget packages.
I appreciate the comments and the links. I'm trying to get something working quickly (and then later maybe go back and write something myself) so I decided to go the .exe route. But, I can't seem to find it anywhere. Any idea where to find it? I've been going through the Windows links on trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries but am having issues either downloading or getting an .exe
– CorporalCuddler
Nov 21 '18 at 16:45
gisinternals.com/release.php
– lusitanica
Nov 21 '18 at 16:48
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53382883%2fconverting-geotiff-to-geopackage%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you can't do it with GDAL, you'll probably not going to be able to do it with anything else, since C# GIS libraries (Sharpmap, MapWindow, DotSpatial, etc...) normally depend on GDAL.
That said, and since there's no C# implementation for gdal_translate:
https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps
That leaves you two alternatives:
- Implement the functionality you want. GDALwrite.cs would be a good start
https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/GDALWrite.cs
OR,
- Call gdal_translate.exe directly from C#, the same way we normally do with ogr2ogr.exe
https://gis.stackexchange.com/questions/143920/how-do-i-call-ogr2ogr-from-a-c-application
Note: GeoPackage support in GDAL requires the library to be compiled against libsqlite3. You'll have to check that on your nuget packages.
I appreciate the comments and the links. I'm trying to get something working quickly (and then later maybe go back and write something myself) so I decided to go the .exe route. But, I can't seem to find it anywhere. Any idea where to find it? I've been going through the Windows links on trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries but am having issues either downloading or getting an .exe
– CorporalCuddler
Nov 21 '18 at 16:45
gisinternals.com/release.php
– lusitanica
Nov 21 '18 at 16:48
add a comment |
If you can't do it with GDAL, you'll probably not going to be able to do it with anything else, since C# GIS libraries (Sharpmap, MapWindow, DotSpatial, etc...) normally depend on GDAL.
That said, and since there's no C# implementation for gdal_translate:
https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps
That leaves you two alternatives:
- Implement the functionality you want. GDALwrite.cs would be a good start
https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/GDALWrite.cs
OR,
- Call gdal_translate.exe directly from C#, the same way we normally do with ogr2ogr.exe
https://gis.stackexchange.com/questions/143920/how-do-i-call-ogr2ogr-from-a-c-application
Note: GeoPackage support in GDAL requires the library to be compiled against libsqlite3. You'll have to check that on your nuget packages.
I appreciate the comments and the links. I'm trying to get something working quickly (and then later maybe go back and write something myself) so I decided to go the .exe route. But, I can't seem to find it anywhere. Any idea where to find it? I've been going through the Windows links on trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries but am having issues either downloading or getting an .exe
– CorporalCuddler
Nov 21 '18 at 16:45
gisinternals.com/release.php
– lusitanica
Nov 21 '18 at 16:48
add a comment |
If you can't do it with GDAL, you'll probably not going to be able to do it with anything else, since C# GIS libraries (Sharpmap, MapWindow, DotSpatial, etc...) normally depend on GDAL.
That said, and since there's no C# implementation for gdal_translate:
https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps
That leaves you two alternatives:
- Implement the functionality you want. GDALwrite.cs would be a good start
https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/GDALWrite.cs
OR,
- Call gdal_translate.exe directly from C#, the same way we normally do with ogr2ogr.exe
https://gis.stackexchange.com/questions/143920/how-do-i-call-ogr2ogr-from-a-c-application
Note: GeoPackage support in GDAL requires the library to be compiled against libsqlite3. You'll have to check that on your nuget packages.
If you can't do it with GDAL, you'll probably not going to be able to do it with anything else, since C# GIS libraries (Sharpmap, MapWindow, DotSpatial, etc...) normally depend on GDAL.
That said, and since there's no C# implementation for gdal_translate:
https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps
That leaves you two alternatives:
- Implement the functionality you want. GDALwrite.cs would be a good start
https://trac.osgeo.org/gdal/browser/trunk/gdal/swig/csharp/apps/GDALWrite.cs
OR,
- Call gdal_translate.exe directly from C#, the same way we normally do with ogr2ogr.exe
https://gis.stackexchange.com/questions/143920/how-do-i-call-ogr2ogr-from-a-c-application
Note: GeoPackage support in GDAL requires the library to be compiled against libsqlite3. You'll have to check that on your nuget packages.
answered Nov 21 '18 at 9:06
lusitanicalusitanica
46829
46829
I appreciate the comments and the links. I'm trying to get something working quickly (and then later maybe go back and write something myself) so I decided to go the .exe route. But, I can't seem to find it anywhere. Any idea where to find it? I've been going through the Windows links on trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries but am having issues either downloading or getting an .exe
– CorporalCuddler
Nov 21 '18 at 16:45
gisinternals.com/release.php
– lusitanica
Nov 21 '18 at 16:48
add a comment |
I appreciate the comments and the links. I'm trying to get something working quickly (and then later maybe go back and write something myself) so I decided to go the .exe route. But, I can't seem to find it anywhere. Any idea where to find it? I've been going through the Windows links on trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries but am having issues either downloading or getting an .exe
– CorporalCuddler
Nov 21 '18 at 16:45
gisinternals.com/release.php
– lusitanica
Nov 21 '18 at 16:48
I appreciate the comments and the links. I'm trying to get something working quickly (and then later maybe go back and write something myself) so I decided to go the .exe route. But, I can't seem to find it anywhere. Any idea where to find it? I've been going through the Windows links on trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries but am having issues either downloading or getting an .exe
– CorporalCuddler
Nov 21 '18 at 16:45
I appreciate the comments and the links. I'm trying to get something working quickly (and then later maybe go back and write something myself) so I decided to go the .exe route. But, I can't seem to find it anywhere. Any idea where to find it? I've been going through the Windows links on trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries but am having issues either downloading or getting an .exe
– CorporalCuddler
Nov 21 '18 at 16:45
gisinternals.com/release.php
– lusitanica
Nov 21 '18 at 16:48
gisinternals.com/release.php
– lusitanica
Nov 21 '18 at 16:48
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53382883%2fconverting-geotiff-to-geopackage%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown