Class: Georeference::Wkt
- Inherits:
-
Georeference
- Object
- ActiveRecord::Base
- ApplicationRecord
- Georeference
- Georeference::Wkt
- Defined in:
- app/models/georeference/wkt.rb
Overview
A Georeference derived from the user supplying Wkt en.wikipedia.org/wiki/Well-known_text_representation_of_geometry
Constant Summary
Constants included from SoftValidation
SoftValidation::ANCESTORS_WITH_SOFT_VALIDATIONS
Instance Attribute Summary collapse
-
#wkt ⇒ Object
Returns the value of attribute wkt.
Attributes inherited from Georeference
#api_request, #collecting_event_id, #day_georeferenced, #error_depth, #error_geographic_item_id, #error_radius, #geographic_item_id, #iframe_response, #is_median_z, #is_public, #is_undefined_z, #month_georeferenced, #no_cached, #position, #project_id, #type, #year_georeferenced
Instance Method Summary collapse
Methods inherited from Georeference
#add_err_geo_item_inside_err_radius, #add_error_depth, #add_error_geo_item_inside_area, #add_error_geo_item_intersects_area, #add_error_radius, #add_error_radius_inside_area, #add_obj_inside_area, #add_obj_inside_err_geo_item, #add_obj_inside_err_radius, batch_create_from_georeference_matcher, #check_err_geo_item_inside_err_radius, #check_error_geo_item_inside_area, #check_error_geo_item_intersects_area, #check_error_radius_inside_area, #check_obj_inside_area, #check_obj_inside_err_geo_item, #check_obj_inside_err_radius, #dwc_occurrences, #error_box, #error_radius_buffer_polygon, filter_by, #geographic_item_present_if_error_radius_provided, #heading, #latitude, #longitude, #method_name, point_type, #radius_from_error_shape, #round_error_radius, #set_cached, #set_cached_collecting_event, #to_geo_json_feature, #to_simple_json_feature, with_geographic_area, with_locality, with_locality_as, with_locality_like, within_radius_of_item
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::Confidences
Methods included from Shared::DataAttributes
#import_attributes, #internal_attributes, #keyword_value_hash, #reject_data_attributes
Methods included from Shared::Citations
#cited?, #mark_citations_for_destruction, #nomenclature_date, #origin_citation_source_id, #reject_citations, #requires_citation?, #sources_by_topic_id
Methods included from Shared::ProtocolRelationships
#protocolled?, #reject_protocols
Methods included from Shared::Tags
#reject_tags, #tag_with, #tagged?, #tagged_with?
Methods included from Shared::Notes
#concatenated_notes_string, #reject_notes
Methods included from SoftValidation
#clear_soft_validations, #fix_for, #fix_soft_validations, #soft_fixed?, #soft_valid?, #soft_validate, #soft_validated?, #soft_validations, #soft_validators
Methods included from Housekeeping
#has_polymorphic_relationship?
Methods inherited from ApplicationRecord
Instance Attribute Details
#wkt ⇒ Object
Returns the value of attribute wkt.
4 5 6 |
# File 'app/models/georeference/wkt.rb', line 4 def wkt @wkt end |
Instance Method Details
#dwc_georeference_attributes ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 |
# File 'app/models/georeference/wkt.rb', line 26 def dwc_georeference_attributes h = {} super(h) h.merge!( georeferenceSources: "Undefined WKT source.", georeferenceRemarks: "Created by pasting in a shape in WKT (well known text) format.", geodeticDatum: nil # TODO: check ) h[:georeferenceProtocol] = 'General purpose georeference derived from any source that produces WKT (well known text).' if h[:georeferenceProtocol].blank? h end |
#wkt_is_parseable ⇒ Object
22 23 24 |
# File 'app/models/georeference/wkt.rb', line 22 def wkt_is_parseable errors.add(:WKT, @wkt_error) if @wkt_error end |