Import GPX

Kjetil Pedersen3 years ago

Hello!

Have a file with about 100 geofences in one GPX file. If i import that using the UI i only get one geofence, how can i import all of them?

Anton Tananaev3 years ago

Using API? You'll have to write a script.

Kjetil Pedersen3 years ago

Ok, do you have any documentation for the "area": "string"?

Anton Tananaev3 years ago
Vajihks Morotell3 years ago

Hi Anton,

I am importing data using WKT file of my city but, it is giving this error.

Data truncation: Data too long for column 'area' at row 1 - MysqlDataTruncation (... < QueryBuilder: 446 < DataManager: 425 < BaseObjectManager: 123 < ...)
Kjetil Pedersen3 years ago

Dont hijack this thread.
In PhpMyAdmin go to Database: traccar »Tabell: tc_geofences change area, change type from varchar to longtext

Vajihks Morotell3 years ago

You are discourteous.
It is not a matter of hijacking a post, Noob one is just asking a question with some hope.
I just need to confirm the impact during migration of the server if I will change the datatype in the database.

Any way, Thanks for the help

Kjetil Pedersen3 years ago

Yes you hare hijacking, just create your own thread.

Peek2 months ago

Is API script still the only method to date ? (No option for polygon import directly via UI)

Anton Tananaev2 months ago

It doesn't seem like your question is related to the topic. You can upload a GPX geofence via UI, but we don't support bulk upload and we only support polylines.

Peek2 months ago

Can the DB entry be edited from polyline to polygon ?

Anton Tananaev2 months ago

Probably. Never tried.

Peek2 months ago

Removing geofences directly in the DB still has those removed geofences alerting.

Is there a cache to be flushed ?

Anton Tananaev2 months ago

Yes. That's why you should use the API instead of modifying the database directly.

Peek2 months ago

Simple mariadb update seems to work fine converting polyline to polygon.

How involved would it be to now only query "line" or "poly" upon uploading via the UI ?