Created
February 22, 2010 22:21
-
-
Save dwins/311582 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> import org.geoscript._ | |
import org.geoscript._ | |
scala> import GeoScript._ | |
import GeoScript._ | |
scala> val pg = workspace.Postgis("database" -> "pg_test") | |
pg: org.geoscript.workspace.Workspace = <Workspace: {port=5432, passwd=, dbtype=postgis, host=localhost, charset=utf-8, user=postgres, database=pg_test}> | |
scala> val statesShp = layer.Shapefile("geoscript/src/test/resources/data/states.shp") | |
statesShp: org.geoscript.layer.Layer = <Layer name: states, count: 49> | |
scala> val statesPg = pg.create(statesShp.schema) | |
statesPg: org.geoscript.layer.Layer = <Layer name: states, count: 0> | |
scala> statesPg ++= statesShp.features |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment