PHPackages                             crovitche/swiss-geo-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. crovitche/swiss-geo-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

crovitche/swiss-geo-bundle
==========================

Import swiss building addresses, streets and localities locally on your MySQL database using Doctrine ORM

1.2.4(8mo ago)32.2kGPL-3.0-onlyPHPPHP &gt;=8.2

Since Nov 9Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/Crovitche-1623/swiss-geo-bundle)[ Packagist](https://packagist.org/packages/crovitche/swiss-geo-bundle)[ RSS](/packages/crovitche-swiss-geo-bundle/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (20)Versions (11)Used By (0)

SwissGeoBundle
==============

[](#swissgeobundle)

SwissGeoBundle provide you a clean way to use swiss and liechtensteinian building addresses. If you have the following use cases, this bundle can be useful for you :

- An autocomplete address input without incorrect address entries
- Store addresses locally (**offline !**)
    - "*I want to locate my clients on a map offline.*"
- Create statistics based on addresses:
    - "*In which locality do I have the majority of my customers?*"
- Avoid Google Map services and therefore save money
- Avoid having postal addresses that are no longer valid.
    - "*How can this customer live here? This building has been destroyed!*"
- Get some information about addresses:
    - "*Is this building partly residential ?*"
    - "*Is this address on a street or a place?*"
    - "*Is this address already built or planned ?*"
- ...

Technical requirements
======================

[](#technical-requirements)

SwissGeoBundle requires the following:

- MySQL 8.0 or higher (other RDBMS coming soon...) with this options activated:
    - LOAD DATA INFILE
- PHP 8.1 or higher
- Symfony components specified in `composer.json`
- Doctrine ORM entities (Doctrine ODM is not supported)
- Meilisearch v1.5 - Necessary for full address search (performance too low otherwise) ```
    version: '3.7'

    services:
       meilisearch:
           hostname: meilisearch
           image: getmeili/meilisearch:v1.5
           environment:
             - MEILI_ENV=development
             # set the max payload to 200Mb instead of 100 default one
             # addresses file is around 170Mb
             - MEILI_HTTP_PAYLOAD_SIZE_LIMIT=209715200
             - MEILI_NO_ANALYTICS=true
           ports:
             - '7701:7700'
           networks:
             - network
           volumes:
             - meilisearch-data:/data.ms
           restart: unless-stopped
    ```

Installation
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
composer require crovitche/swiss-geo-bundle
```

Then make sure the bundle is enabled in registered bundles in `config/bundles.php` if your application doesn't use Symfony Flex.

Getting started
===============

[](#getting-started)

Run the following commands and put them in a cron if you want your data to be updated regularly.

1. Configure your entity
------------------------

[](#1-configure-your-entity)

```
