Skip to content

waldekgraban/svx-adapter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SVX file adapter to PHP objects.

This project was created in order to promote and simplify the work with cave measurement data and make it possible to work with them in the Apache / Nginix environment.

What is .svx file format?

It is the file format of Survex, an open source software for mapping and digital representation of cave plans and maps by Olly Betts.

enter image description here

Very, very simple example of an svx file:

*begin Siedlecka_Cave

*infer exports on

*title "Siedlecka Cave"

*units tape metres

*calibrate declination 2.8

*entrance 0

*team "Waldemar Graban" compass clino - lider
*team "Paulina Kulpa"   notes
*team "Józef Kucia"     tape	      - dog
*date 2019.05.18

*data normal from to tape compass clino

0	1	6.5	293	-36
1	2	5.4	234	-41
2	3	2.5	237	-38
3	4	7.9	246	-33

*end

This project allows you to convert cave measurement data from SVX to a PHP collection.

The method and example of use are in the file index.php

use Waldekgraban\SvxAdapter\SvxImporter\Svx;
use Waldekgraban\SvxAdapter\Adapter\Parser\Parser;

$filename =  __DIR__  .  '/SvxExampleFiles/black_howk_down.svx';

$importer =  new  Svx;
$importer->importSvx($filename);

$parser =  Parser::make($importer->file);

$surveys = $parser->parse();
$survey = $surveys->first();

$data = $survey->getData()->first();

foreach ($data->getMeasurements() as $measurement) {
    dump($measurement->getValues());
}

An example of a converted advanced svx file:

obraz

Huge thanks to:

Krzysztof Grabania - Great programming support

Mateusz Golicz - Cartographic consultations

Olly Betts - Substantive support (Survex data structure)

Dariusz Lubomski - Math consultations and technical resources

Józef Kucia obraz - Consulting in the field of processing and structures of geological data

About

SVX file adapter to PHP objects

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages