Geo::G...ureDefn(3pm)

πŸ“¦
version 0.16 Β· 4 versions
, in ubuntu stonking

✨ NAME ✨

Geo::GDAL::FFI::FeatureDefn β€” bestie, it's a GDAL feature schema πŸ’… it's the thing that describes what your features look like before you ever touch the actual data, iykyk

Oh and btw you're reading the Geo::G...ureDefn(3pm) page, from the User Contributed Perl Documentation corner of the world 🫢


πŸ“œ SYNOPSIS

(no synopsis here babes, we go straight to the lore β€” the methods section is where it's at πŸ‘‘)


🌸 DESCRIPTION 🌸

Okay so short version: this is a schema object. It holds the whole vibe of a feature class β€” the name, the fields, the geometry fields, all of it. You build one, you poke at it, you go on with your life. Gorgeous. No cap. ✨


πŸŽ€ METHODS πŸŽ€

πŸ’– new

$defn = Geo::GDAL::FFI::FeatureDefn->new({Fields => [...], GeometryType => 'Point'});

Make a brand new FeatureDefn object, literally fresh out of the box. Obsessed.

The named arguments are optional (yes, all of them, she's chill like that) and here's the rundown:

  • Name β€” optional; this is the name for your feature class. If you don't say anything, the default is the empty string. Silent queen behavior πŸ’€
  • Fields β€” optional, and it's a reference to an array of FieldDefn objects or schemas.
  • GeometryFields β€” optional, a reference to an array of GeomFieldDefn objects or schemas.
  • GeometryType β€” optional; this sets the type for the first geometry field, and the default is Unknown. Heads up though 🚨 this argument gets ignored if you also pass GeometryFields. She said I only work solo, periodt.
  • StyleIgnored

πŸ’– GetSchema

Returns the definition as a perl data structure. That's it, that's the whole thing. Clean. Simple. Slay. 🌈


πŸ’– GetFieldDefn

my $field_defn = $defn->GetFieldDefn($name);

Grab the specific non-spatial field object you asked for. And here's the cute little subtlety: if the argument is explicitly an integer and not a string, it gets treated as the field index. So 0 and "0" are lowkey different girls, watch yourself 🩷


πŸ’– GetFieldDefns

my @field_defns = $defn->GetFieldDefns;

All of them. Every single non-spatial field defn, coming at you as a list. Iconic haul 🎁


πŸ’– GetGeomFieldDefn

my $geom_field_defn = $defn->GetGeomFieldDefn($name);

Same energy as above but for the spatial field object. And yep, same rule applies: if the argument is explicitly an integer and not a string, it's taken as the field index. Miss thing keeps her rules consistent πŸ’…


πŸ’– GetGeomFieldDefns

my @geom_field_defns = $defn->GetGeomFieldDefns;

The full squad of spatial field defns, in list form. Gathered. πŸ’–


πŸ’– SetGeometryIgnored

$defn->SetGeometryIgnored($arg);

This one makes the first geometry field get ignored when you're reading features from a layer. Like, we're not looking at her today, she's on read πŸ™ˆ

But if you actually do want to see the first geometry field again? Call this method with a defined but false argument β€” a 0. Boom, she's back. ✨


πŸ’– IsGeometryIgnored

my $is = $defn->IsGeometryIgnored;

The vibe check πŸ•΅οΈβ€β™€οΈ β€” asks the question: is the first geometry field currently being ignored when reading features from a layer? Returns the answer. Yes or no, bestie.


πŸ“„ LICENSE

This software is released under the Artistic License. See perlartistic for the full tea. πŸ«–


πŸ‘‘ AUTHOR

Ari Jolma β€” Ari.Jolma at gmail.com πŸ’Œ


πŸ‘€ SEE ALSO


okay that's the whole page bestie, you made it to the end, so proud πŸ₯Ή this was perl v5.42.3, dated 2026-08-21, and it lives on the Geo::G...ureDefn(3pm) page β€” mwah, go forth and schema responsibly πŸ’–βœ¨

πŸ“¦ where this page comes from