Geo::G...ureDefn(3pm)
β¨ 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 ofFieldDefnobjects or schemas.GeometryFieldsβ optional, a reference to an array ofGeomFieldDefnobjects or schemas.GeometryTypeβ optional; this sets the type for the first geometry field, and the default isUnknown. Heads up though π¨ this argument gets ignored if you also passGeometryFields. 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
Geo::GDAL::FFIAlien::gdal,FFI::Platypus,<http://www.gdal.org>
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
- ubuntu stonking: libgeo-gdal-ffi-perl 0.16-1build2 Β· Artistic-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms