Import GPX

Kjetil Pedersen4 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 Tananaev4 years ago

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

Kjetil Pedersen4 years ago

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

Anton Tananaev4 years ago
Vajihks Morotell4 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 Pedersen4 years ago

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

Vajihks Morotell4 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 Pedersen4 years ago

Yes you hare hijacking, just create your own thread.

Peek5 months ago

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

Anton Tananaev5 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.

Peek5 months ago

Can the DB entry be edited from polyline to polygon ?

Anton Tananaev5 months ago

Probably. Never tried.

Peek5 months ago

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

Is there a cache to be flushed ?

Anton Tananaev5 months ago

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

Peek5 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 ?