diff --git a/src/files/shapefile/core/shapeFileReader.ts b/src/files/shapefile/core/shapeFileReader.ts index e336219..09e3946 100644 --- a/src/files/shapefile/core/shapeFileReader.ts +++ b/src/files/shapefile/core/shapeFileReader.ts @@ -49,9 +49,16 @@ export class ShapefileChunkReader { continue; } - const feature = { ...(generateFeatureId && { id: randomUUID() }), ...shapeFeature }; - if (feature.id !== undefined) { - this.options.logger?.debug({ msg: `Feature ID: ${feature.id}` }); + const feature = { + ...shapeFeature, + properties: { + ...shapeFeature.properties, + ...(generateFeatureId && { id: randomUUID() }), + }, + }; + + if (feature.properties.id !== undefined) { + this.options.logger?.debug({ msg: `Feature ID: ${feature.properties.id}` }); } if (!chunkBuilder.canAddFeature(feature)) {