GeoData

class GeoData(DXFObject)

Introduced in DXF version R2010 (AC1024), dxftype is GEODATA

The GEODATA entity is associated to the Modelspace object, create new geo data by Modelspace.new_geodata(), or get existing geo data by Modelspace.get_geodata().

See also

using_geodata.py

DXF Attributes for GeoData

GeoData.dxf.version
  • 1 = 2009
  • 2 = 2010
GeoData.dxf.coordinate_type
  • 0 = unknown
  • 1 = local grid
  • 2 = projected grid
  • 3 = geographic (latitude/longitude)
GeoData.dxf.block_record

Handle of host block table record.

GeoData.dxf.design_point

Reference point in WCS coordinates.

GeoData.dxf.reference_point

Reference point in coordinate system coordinates, valid only when coordinate type is Local Grid.

GeoData.dxf.north_direction

North direction as 2D vector.

GeoData.dxf.horizontal_unit_scale

Horizontal unit scale, factor which converts horizontal design coordinates to meters by multiplication.

GeoData.dxf.vertical_unit_scale

Vertical unit scale, factor which converts vertical design coordinates to meters by multiplication.

GeoData.dxf.horizontal_units

Horizontal units per UnitsValue enumeration. Will be kUnitsUndefined if units specified by horizontal unit scale is not supported by AutoCAD enumeration.

GeoData.dxf.vertical_units

Vertical units per UnitsValue enumeration. Will be kUnitsUndefined if units specified by vertical unit scale is not supported by AutoCAD enumeration.

GeoData.dxf.up_direction

Up direction as 3D vector.

GeoData.dxf.scale_estimation_method
  • 1 = none
  • 2 = user specified scale factor
  • 3 = grid scale at reference point
  • 4 = prismoidal
GeoData.dxf.sea_level_correction

Bool flag specifying whether to do sea level correction.

GeoData.dxf.user_scale_factor
GeoData.dxf.sea_level_elevation
GeoData.dxf.coordinate_projection_radius
GeoData.dxf.geo_rss_tag
GeoData.dxf.observation_from_tag
GeoData.dxf.observation_to_tag
GeoData.dxf.mesh_faces_count

GeoData Methods

GeoData.get_coordinate_system_definition()
Returns:Coordinate system definition string (always a XML string?)
GeoData.set_coordinate_system_definition(text)
GeoData.get_mesh_data()

Returns mesh as list of vertices and list of faces. Each vertex entry is a 2-tuple of source and target point, vertices are 2D points. Each face entry is a 3-tuple of vertex indices (0 based).

Returns:tuple (vertices, faces)
GeoData.set_mesh_data(vertices=None, faces=None)

Each vertex entry is a 2-tuple of source and target point, all vertices are 2D points. Each face entry is a 3-tuple of vertex indices (0 based), faces are optional.