corvino / GORM-PostGIS

Example demonstrating using GORM with PostGIS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

Example demonstrating using GORM with PostGIS.


Languages

Language:Go 92.4%Language:Shell 7.6%