/GORM-PostGIS

Example demonstrating using GORM with PostGIS.

Primary LanguageGo

GORM+PostGIS

A sample project to demonstrate using the Go ORM GORM to interact with PostGIS.

Use GORM customized data types to read and write geography/geometry columns, which can be specified struct tag. Values are turned into geos types.

Example

create.sh and destroy.sh scripts in db can be used to create and destroy the database running on localhost.

The go program writes some sample cities to the database, and then queries for cities around Seattle.

References