Created
February 27, 2017 12:14
-
-
Save zackperdue/43b352c620636b8db191325029cb73d2 to your computer and use it in GitHub Desktop.
postgis initializer for rails
This file contains 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
RGeo::ActiveRecord::SpatialFactoryStore.instance.tap do |config| | |
# By default, use the GEOS implementation for spatial columns. | |
config.default = RGeo::Geos.factory_generator | |
# But use a geographic implementation for point columns. | |
config.register(RGeo::Geographic.spherical_factory(srid: 4326), geo_type: "point") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment