File formats, layers and coordinate metadata#
A file’s reader, logical layer and geometry declaration determine what a query can read. The table describes local file selection. Opening the selected source validates its contents and its reader profile. An explicit format hint is case-insensitive. Without one, the resolver uses path suffix and directory rules rather than content sniffing. An unknown file extension raises UnknownExtension.
File and layer lookup#
Family |
Paths and companion inputs |
Layer and geometry notes |
|---|---|---|
Parquet |
|
GeoParquet metadata can declare geometry. Plain binary columns need an appropriate geometry declaration or |
Shapefile |
|
Geometry is source-owned and decoded through the |
FlatGeobuf |
|
Source-owned geometry uses the same decode surface. Bounding-box pruning is optional when the plan admits it. Raw record bytes are not exposed. |
FileGDB |
|
An exact logical layer is required. Geometry is canonical source-owned Geometry. |
GeoPackage |
|
An exact feature layer is required. The native open contract requires a clean, quiescent source. |
KML |
Uncompressed |
Select an exact layer if needed. Omission is allowed only when there is one logical layer. |
OSM PBF |
|
An exact layer is required: |
CSV |
|
Declare a geometry mode explicitly. Values do not infer one. See the CSV lookup below. |
GeoJSON |
|
The suffix selects the reader. The document must satisfy that reader’s content contract. |
Only CSV, KML, FileGDB, GeoPackage and OSM PBF accept source options. Unsupported options are checked before the source is opened. The source resolver and reader contracts contain the format-specific details.
What does this geometry column contain?#
Representation |
Meaning |
|---|---|
Source-owned Geometry |
The reader owns the geometry representation. Shapefile and FlatGeobuf expose device-managed decode rather than raw record bytes. |
Binary geometry input |
A binary column can be declared as geometry or decoded with |
Ordinary binary attribute |
Binary data is not automatically geometry merely because its bytes resemble WKB. |
CSV requires an explicit geometry mapping.
Mode |
Mapping |
|---|---|
No geometry |
|
Coordinates |
|
WKT |
|
Hexadecimal WKB |
|
The CSV options also include srid, defaulting to 0, and a delimiter, defaulting to a comma. SRID 0 exposes Binary geometry for ST_GeomFromWKB. A nonzero SRID exposes typed Geometry.
For Parquet, inspect the GeoParquet declaration for the primary geometry column, encoding, geometry family, axes, edge model and optional covering. Those declarations and the selected execution profile affect what can be read. A suffix alone does not establish support for every layout.
Python and native scan controls#
Interface |
Controls and behavior |
|---|---|
|
Describes a file or dataset without reading it. |
|
Reads eagerly. Column labels are exact. Projection retains the active geometry. Source rows receive a new RangeIndex. Geometry declarations can be |
Native source APIs |
The native Parquet interface includes file-stamp and planning, projection, filter and row-range controls. Their availability and route conditions are interface and reader specific. They do not constitute a blanket promise for every Python reader. |
See the Python interface and native source API for their respective contracts.
Coordinate metadata#
Metadata |
CRS omitted |
CRS explicitly null |
|---|---|---|
GeoParquet |
CRS84 convention |
Unknown |
GeoArrow |
Unknown |
Unknown |
GeoArrow defaults omitted edges to planar. Its metadata parser distinguishes captured catalog identifiers from opaque strings declared with crs_type=srid, and retains raw CRS JSON. GeoParquet metadata also records encoding, axes, edges and covering information.
A malformed optional covering can disable pruning. Conversely, a scan that prunes a row can succeed even when decoding that row’s WKB would fail. A scan that demands the row can expose the error. Covering is a scan hint. It does not validate every geometry.
GeoParquet output#
The checked shell/native write-and-reopen route covers planar XY and XYZ profiles, scalar attributes and stored Z, including plain XY and absent, null and object CRS cases. Source CRS omitted writes the CRS84 convention. Explicit null remains unknown. A PROJJSON object is retained verbatim. Plain binary input writes a null CRS. The checked route rejects M and ZM profiles and spherical edges. These assertions do not establish a public Python writer or parity across all readers. See the writer and write-and-reopen tests.