PHPackages                             krsc/krsc-photo-db - 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. krsc/krsc-photo-db

ActiveLibrary[Database &amp; ORM](/categories/database)

krsc/krsc-photo-db
==================

Krsc-Photo-Db is a tool to import, store in db and analyse exif data from photos. Takes advantage of oracle pl/sql to make calculations on big amount of data.

v1.0.0(6y ago)03GPL-3.0PHPPHP ^7.1

Since Mar 30Pushed 6y ago1 watchersCompare

[ Source](https://github.com/krzysztofruszczynski/Krsc-Photo-Db)[ Packagist](https://packagist.org/packages/krsc/krsc-photo-db)[ Docs](https://github.com/krzysztofruszczynski/Krsc-Photo-Db/blob/master/README.md)[ RSS](/packages/krsc-krsc-photo-db/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Krsc-Photo-Db
=============

[](#krsc-photo-db)

Tool to import, store in db and analyse exif data from photos.

Import metadata
===============

[](#import-metadata)

In order to import metadata from photos, please use:

```
php ImportCommand.php /my/directory/with/photos sql_file.sql
```

Where

```
/my/directory/with/photos
```

 is folder, which is recursively searched for photos and ```
sql_file.sql
```

 is dynamically generated file with import. If second parameter is omitted, sql data will be displayed in output.Oracle db
=========

[](#oracle-db)

In Database/Oracle folder are sql files with database for storing photos. Please change schema name "YOURSCHEMA" to your own needs. After importing sql made via ImportCommand.php you are able to create gpx file with photo locations. To decide, which photos are taken into account, you can use two methods:

```
BEGIN
    photo_pkg.load_gps_data_by_filename('IMG_10282_g.JPG');
END;
```

Imports only selected photo. Optional second parameter decides, if previous data stays. If stays it should be 0, like in this example:

```
BEGIN
    photo_pkg.load_gps_data_by_filename('IMG_10282_g.JPG');
    photo_pkg.load_gps_data_by_filename('IMG_10283_g.JPG', 0);
END;
```

In such case both photos are loaded. To check number of loaded photos you can use pipelined function:

```
select * from photo_pkg.gps_table();
```

You can also load all photos matching specified date range (first start date, second finish date; both or one of parameters can be null):

```
BEGIN
    photo_pkg.load_gps_data_by_date('15/01/01', '20/08/01');
END;
```

After data are loaded, you can create gpx file with method:

```
photo_pkg.get_gpx_file_content
```

 with obligatory CLOB parameter. It is possible to write it directly to console (with bigger set of data the only way to avoid errors, please adjust buffer size) or by out variable. Second optional parameter decides about this (by default console, if input: 0 then data is inside out variable, given as first parameter). Example using out variable:```
DECLARE
    out_content CLOB;
BEGIN
    photo_pkg.load_gps_data_by_filename('IMG_10282_g.JPG');
    photo_pkg.load_gps_data_by_filename('IMG_10283_g.JPG', 0);
    photo_pkg.get_gpx_file_content(out_content, 0);
    dbms_output.put_line(out_content);
END;
```

Below example using console (probably bigger set of data):

```
DECLARE
    out_content CLOB;
BEGIN
    photo_pkg.load_gps_data_by_date('15/01/01');
    photo_pkg.get_gpx_file_content(out_content);
END;
```

In example above, only start date is provided. If first parameter is set to NULL, only finish date can be provided.

Other functions for working with gps data:

```
BEGIN
    photo_pkg.load_gps_data_by_filename('IMG_10282_g.JPG');
    dbms_output.put_line(photo_pkg.v_photos_exif_gps_data_array(1).get_altitude);
    dbms_output.put_line(photo_pkg.v_photos_exif_gps_data_array(1).get_google_maps_url);
    dbms_output.put_line(photo_pkg.v_photos_exif_gps_data_array(1).get_trackpoint);
END;
```

Function get\_altitude returns attitude for photo (like "2096 meters above sea level"), get\_google\_maps\_url returns url showing point on google map and get\_trackpoint returns gpx element with photo coordinates.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2234d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c036f93f9b5b732ae804cd822f7c7496f5a51f25b1c2fcf1b7f4870d75459dd?d=identicon)[krzysztofruszczynski](/maintainers/krzysztofruszczynski)

---

Top Contributors

[![krzysztofruszczynski](https://avatars.githubusercontent.com/u/9629651?v=4)](https://github.com/krzysztofruszczynski "krzysztofruszczynski (13 commits)")

---

Tags

oraclephotosgpsexifgpxplsql

### Embed Badge

![Health badge](/badges/krsc-krsc-photo-db/health.svg)

```
[![Health](https://phpackages.com/badges/krsc-krsc-photo-db/health.svg)](https://phpackages.com/packages/krsc-krsc-photo-db)
```

###  Alternatives

[doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.

9.7k578.4M5.6k](/packages/doctrine-dbal)[catfan/medoo

The lightweight PHP database framework to accelerate development

4.9k1.5M194](/packages/catfan-medoo)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8703.0M17](/packages/yajra-laravel-oci8)[nette/database

💾 Nette Database: layer with a familiar PDO-like API but much more powerful. Building queries, advanced joins, drivers for MySQL, PostgreSQL, SQLite, MS SQL Server and Oracle.

5656.7M234](/packages/nette-database)[dibi/dibi

Dibi is Database Abstraction Library for PHP

5013.8M120](/packages/dibi-dibi)[envms/fluentpdo

FluentPDO is a quick and light PHP library for rapid query building. It features a smart join builder, which automatically creates table joins.

925511.7k13](/packages/envms-fluentpdo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
