SharpMap vs DB

Topics: SharpMap Project, SharpMap v0.9 / v1.x, SharpMap v2.0, WinForms Controls
Apr 22, 2011 at 9:12 AM

Help me, please, with my problem. I want to store all my geometries data to database (SQLite for example), but i dont know structure of database tables for each geometry object ( аnd what tables i need for build map). Where i can read about this?

Coordinator
Apr 26, 2011 at 12:43 PM

Hello Rikkymaru,

the steps you need to take to store geometry data in a database vary from database to database.

If you want to use PostgreSQL/PostGis, e.g., you need to create your table as you would for any nonspatial purpose and after that you'd call

SELECT AddGeometryColumn(schemaName, tableName, columnName, SRID, geometryType);

The same applies to SQLite/SpatiaLite, except that there is no parameter for schemaName).

If you have set that up and filled with data, you can use the respective providers.

Look at the winformsamples project if you have questions related to that.

Hth FObermaier