Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to generate shapefile via database table data? #13

Closed
mdonjones opened this issue Oct 30, 2014 · 1 comment
Closed

Is it possible to generate shapefile via database table data? #13

mdonjones opened this issue Oct 30, 2014 · 1 comment

Comments

@mdonjones
Copy link

For example; using commandline ogr2ogr, I am able to run this command:

ogr2ogr output.shp MYSQL:db,user=db_user,password=db_pass,port=3306 db_table

which generates 3 files: output.dbf, output.shp, and output.shx

Is this currently possible with this module?

@wavded
Copy link
Owner

wavded commented Oct 31, 2014

Should work... try:

ogr2ogr('MYSQL:db,user=db_user,password=db_pass,port=3306 db_table')
  .format('ESRI Shapefile')
  .stream().pipe(fs.createWriteStream('./output.shp'))

@wavded wavded closed this as completed Nov 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants