Import GPX

Kjetil Pedersen 5 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 Tananaev 5 years ago

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

Kjetil Pedersen 5 years ago

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

Anton Tananaev 5 years ago
Vajihks Morotell 5 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 Pedersen 5 years ago

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

Vajihks Morotell 5 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 Pedersen 5 years ago

Yes you hare hijacking, just create your own thread.

Peek a year ago

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

Anton Tananaev a year 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.

Peek a year ago

Can the DB entry be edited from polyline to polygon ?

Anton Tananaev a year ago

Probably. Never tried.

Peek a year ago

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

Is there a cache to be flushed ?

Anton Tananaev a year ago

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

Peek a year 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 ?