Class: GeographicItem::MultiPolygon
- Inherits:
-
GeographicItem
- Object
- ActiveRecord::Base
- ApplicationRecord
- GeographicItem
- GeographicItem::MultiPolygon
- Defined in:
- app/models/geographic_item/multi_polygon.rb
Overview
Multi polygon definition…
Constant Summary collapse
- SHAPE_COLUMN =
:multi_polygon
Constants inherited from GeographicItem
ANTI_MERIDIAN, DATA_TYPES, GEOGRAPHY_SQL, GEOMETRY_SQL
Instance Attribute Summary
Attributes inherited from GeographicItem
#cached_total_area, #geometry, #line_string, #multi_line_string, #multi_point, #multi_polygon, #no_cached, #point, #polygon, #shape, #type
Attributes included from Housekeeping::Users
Instance Method Summary collapse
- #rendering_hash ⇒ Hash
-
#st_start_point ⇒ RGeo::Point
First point in first polygon.
-
#to_a ⇒ Array
Arrays of points.
Methods inherited from GeographicItem
aliased_geographic_sql, #align_winding, are_contained_in_item, are_contained_in_item_by_id, are_contained_in_wkt, #area, #center_coords, #centroid, contained_by, contained_by_where_sql, contained_by_with_antimeridian_check, contained_by_wkt_shifted_sql, contained_by_wkt_sql, containing, #containing_geographic_areas, containing_point, containing_sql, containing_where_for_point_sql, containing_where_sql, containing_where_sql_geog, #contains?, crosses_anti_meridian?, crosses_anti_meridian_by_id?, debug_draw, default_by_geographic_area_ids, disjoint_from, distance_between, eval_for_type, #far, #geo_object, #geo_object_type, #geo_type, #geographic_name_hierarchy, geometry_for, geometry_for_collection_sql, geometry_for_sql, geometry_sql, geometry_sql2, #has_polygons?, #inferred_geographic_name_hierarchy, intersecting, #intersecting_area, intersecting_radius_of_wkt_sql, #intersects?, #is_basic_donut?, is_contained_by, is_contained_by_sql, lat_long_sql, #line_string_to_a, #line_string_to_hash, #multi_line_string_to_a, #multi_line_string_to_hash, #multi_point_to_a, #multi_point_to_hash, #multi_polygon_to_a, #multi_polygon_to_hash, #near, not_including, ordered_by_longest_distance_from, ordered_by_shortest_distance_from, #orientations, point_inferred_geographic_name_hierarchy, #point_to_a, #point_to_hash, #polygon_to_a, #polygon_to_hash, #quick_geographic_name_hierarchy, #radius, reverse_containing_sql, #rgeo_to_geo_json, select_distance_with_geo_object, select_geography_sql, select_geometry_sql, #set_cached, #set_type_if_geography_present, single_geometry_sql, #some_data_is_provided, st_buffer_st_within, #st_centroid, st_collect, st_collect_sql, #st_distance, #st_distance_spheroid, #st_distance_to_geographic_item, #st_isvalid, #st_isvalidreason, st_multi, #st_npoints, st_union, #start_point, #to_geo_json, #to_geo_json_feature, #to_geo_json_string, #to_wkt, #valid_geometry?, where_distance_greater_than_zero, with_area, with_collecting_event_through_georeferences, with_is_valid_geometry_column, with_latitude, with_longitude, #within?, within_radius_of_item, within_radius_of_item_sql, within_radius_of_wkt_sql
Methods included from Shared::IsData
#errors_excepting, #full_error_messages_excepting, #identical, #is_community?, #is_destroyable?, #is_editable?, #is_in_use?, #is_in_users_projects?, #metamorphosize, #similar
Methods included from Shared::HasPapertrail
#attribute_updated, #attribute_updater
Methods included from Housekeeping::Users
#set_created_by_id, #set_updated_by_id
Methods inherited from ApplicationRecord
Instance Method Details
#rendering_hash ⇒ Hash
18 19 20 |
# File 'app/models/geographic_item/multi_polygon.rb', line 18 def rendering_hash multi_polygon_to_hash(self.multi_polygon) end |
#st_start_point ⇒ RGeo::Point
Returns first point in first polygon.
13 14 15 |
# File 'app/models/geographic_item/multi_polygon.rb', line 13 def st_start_point geo_object[0].exterior_ring.point_n(0) end |
#to_a ⇒ Array
Returns arrays of points.
8 9 10 |
# File 'app/models/geographic_item/multi_polygon.rb', line 8 def to_a multi_polygon_to_a(self.multi_polygon) end |