dwins / mapnik2geotools

Using the Scala XML API to translate from Mapnik XML to GeoTools' SLD dialect
64 stars 22 forks source link

create or replace #14

Closed dwins closed 13 years ago

dwins commented 13 years ago

From the mailing list:

The sql script generates many "create table" statements. It could be usefull to add "drop table if exist" before in case of update of the map.

dwins commented 13 years ago

We could actually use "CREATE OR REPLACE." http://www.postgresql.org/docs/9.0/static/sql-createtable.html

nseinlet commented 13 years ago

as you wish : $ git diff diff --git a/src/main/scala/FileSystem.scala b/src/main/scala/FileSystem.scala index 9c8992d..83f1d28 100644 --- a/src/main/scala/FileSystem.scala +++ b/src/main/scala/FileSystem.scala @@ -67,6 +67,7 @@ class FileSystem(out: java.io.File) extends Mapnik2GeoTools.Output { val cleanName = name.replaceAll("[\s-]", "_"); val wrapper = """

nseinlet commented 13 years ago

not tested : $ git diff diff --git a/src/main/scala/FileSystem.scala b/src/main/scala/FileSystem.scala index 9c8992d..63ffb1c 100644 --- a/src/main/scala/FileSystem.scala +++ b/src/main/scala/FileSystem.scala @@ -67,7 +67,7 @@ class FileSystem(out: java.io.File) extends Mapnik2GeoTools.Output { val cleanName = name.replaceAll("[\s-]", "_"); val wrapper = """