charta 0.2.2 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +5 -5
  2. data/charta.gemspec +21 -20
  3. data/lib/charta/bounding_box.rb +5 -1
  4. data/lib/charta/coordinates.rb +65 -0
  5. data/lib/charta/ewkt_serializer.rb +101 -0
  6. data/lib/charta/factory/ewkt_feature_builder.rb +17 -0
  7. data/lib/charta/factory/feature_factory_base.rb +15 -0
  8. data/lib/charta/factory/simple_feature_factory.rb +50 -0
  9. data/lib/charta/factory/simple_geometry_factory.rb +46 -0
  10. data/lib/charta/factory/srid_provider.rb +36 -0
  11. data/lib/charta/factory/transformers/ewkt_passthrough.rb +20 -0
  12. data/lib/charta/factory/transformers/ewkt_transformer.rb +20 -0
  13. data/lib/charta/factory/transformers/ewkt_transformer_chain.rb +42 -0
  14. data/lib/charta/factory/transformers/from_geo_json_transformer.rb +20 -0
  15. data/lib/charta/factory/transformers/from_gml_transformer.rb +20 -0
  16. data/lib/charta/factory/transformers/from_kml_transformer.rb +20 -0
  17. data/lib/charta/factory/transformers/from_wkb_transformer.rb +24 -0
  18. data/lib/charta/factory/transformers/transformation_error.rb +10 -0
  19. data/lib/charta/geo_json.rb +12 -124
  20. data/lib/charta/geometry.rb +70 -16
  21. data/lib/charta/geometry_collection.rb +6 -4
  22. data/lib/charta/gml.rb +18 -2
  23. data/lib/charta/gml_import.rb +24 -24
  24. data/lib/charta/kml.rb +21 -3
  25. data/lib/charta/multi_polygon.rb +1 -1
  26. data/lib/charta/point.rb +6 -0
  27. data/lib/charta/polygon.rb +5 -0
  28. data/lib/charta/version.rb +1 -1
  29. data/lib/charta.rb +39 -87
  30. data/lib/rgeo/svg.rb +44 -44
  31. metadata +78 -44
  32. data/.gitignore +0 -11
  33. data/.gitlab-ci.yml +0 -14
  34. data/.travis.yml +0 -7
  35. data/CODE_OF_CONDUCT.md +0 -74
  36. data/Gemfile +0 -4
  37. data/LICENSE.txt +0 -21
  38. data/README.md +0 -44
  39. data/Rakefile +0 -10
data/README.md DELETED
@@ -1,44 +0,0 @@
1
- # Charta
2
-
3
- Charta is an overlay to [RGeo](https://github.com/rgeo/rgeo). Basically, it was developped to permit to manipulate more easily spatial data without using factory system. It's always the case. The code was extracted from [Ekylibre](https://github.com/ekylibre/ekylibre).
4
-
5
- ## Installation
6
-
7
- Add this line to your application's Gemfile:
8
-
9
- ```ruby
10
- gem 'charta'
11
- ```
12
-
13
- And then execute:
14
-
15
- $ bundle
16
-
17
- Or install it yourself as:
18
-
19
- $ gem install charta
20
-
21
- ## Usage
22
-
23
- ```ruby
24
- geom = Charta.new_geometry(<WKT, WKB, GeoJSON...>) #=> <#Charta::Geometry>
25
- geom.point_on_surface #=> <#Charta::Point>
26
-
27
- geom.transform(2154) # => <#Charta::Geometry>
28
- ```
29
-
30
- ## Development
31
-
32
- After checking out the repo, run `bundle` to install dependencies. Then, run `rake test` to run the tests.
33
-
34
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
35
-
36
- ## Contributing
37
-
38
- Bug reports and pull requests are welcome on GitHub at https://github.com/ekylibre/charta. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
39
-
40
-
41
- ## License
42
-
43
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
44
-
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rake/testtask'
3
-
4
- Rake::TestTask.new(:test) do |t|
5
- t.libs << 'test'
6
- t.libs << 'lib'
7
- t.test_files = FileList['test/**/*_test.rb']
8
- end
9
-
10
- task default: :test