mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-15 02:23:07 +00:00
23 lines
738 B
TypeScript
23 lines
738 B
TypeScript
import type {
|
|
BahiaMunicipalityFeature,
|
|
MunicipalityGeometryModule,
|
|
MunicipalityTopology,
|
|
} from '@/lib/bahiaGeometriesTypes'
|
|
import { buildGeometryModuleFromTopology } from '@/lib/bahiaGeometryModuleFactory'
|
|
import municipalityTopologyJson from '@/lib/geometries/bahia-municipalities.topo.json'
|
|
|
|
const { topology, features, getFeatureByKey } = buildGeometryModuleFromTopology<
|
|
BahiaMunicipalityFeature['properties'],
|
|
'municipalities',
|
|
'codarea'
|
|
>({
|
|
topology: municipalityTopologyJson as unknown as MunicipalityTopology,
|
|
objectName: 'municipalities',
|
|
keyProperty: 'codarea',
|
|
})
|
|
|
|
export const municipalityGeometryModule: MunicipalityGeometryModule = {
|
|
topology,
|
|
features,
|
|
getMunicipalityFeature: getFeatureByKey,
|
|
}
|