Nathan, OGRSFDriver::CopyDataSource() may help you. You won't have all the fancy options ogr2ogr provides but you will be able to create a copy of the shapefile.
On Mon, Jul 19, 2010 at 8:16 PM, nlraley <[email protected]>wrote: > > I hope I'm posting in the right group. > > I am trying to use the conversion capabilities of ogr2ogr to convert a > shapefile to kml format so I can basically have a user select a shp file > and > automatically convert it without having them go to the command prompt and > type out the commands or any of that. > > I was handling this by passing commands to the command line to > automatically > generate the necessary commands to do this conversion. > > My question is, what all do I need to include to be able to use the > ogr2ogr.exe fully? Or is there a way to include the dll's do handle it > without the use of the command line? > > The reason I was asking was I wanted to give them the bare minimum > necessary > to perform the conversions and not have to worry about them having to do a > full blown install and then worry about what directory they placed the > files > in and everything of that nature. > > I would like to either: > a) Include the ogr2ogr.exe and the dll's it needs to run and then just pass > the commands like I am doing now > or > b) Include the dll's in the project so I can use the conversion without > having to run ogr2ogr.exe through the command prompt. > > Any ideas? > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Trying-to-use-ogr2ogr-conversion-in-Visual-Studio-Project-Quick-question-tp5312328p5312328.html > Sent from the GDAL - Dev mailing list archive at Nabble.com. > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev > -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
