University of Arkansas – CSCE Department

RFID Agent Middleware – Final Report – Spring 2006

Track History of RFID Tagged Items

Chintapally Vinitha Reddy

Abstract

Radio frequency identification is a technology that uses radio waves to transmit key information over short distances. It consists of an antenna and a transceiver, which read the radio frequency and transfer the information to a processing device, and a transponder, or tag, which is an integrated circuit containing the RF circuitry and information to be transmitted. RFID systems can be used just about anywhere, from clothing tags to missiles to pet tags to food…anywhere that a unique identification system is needed. One of the key differences between RFID and bar code technology is RFID eliminates the need for line-of-sight reading that bar coding depends on. Also, RFID scanning can be done at greater distances than bar code scanning.

The spatial technology suite in Oracle enables storage of spatial data in the database and facilitates different types of analysis on spatial data. The SDO_GEOMETRY data type in Oracle Spatial captures the location and shape information of data rows in a table.This data type is internally represented as an Oracle object data type.

All the items which have RFID tags on them move from one place to another place. But it is very difficult to know the track history of all these items. In this case, the spatial technology comes into picture. The SDO_GEOMETRY data type in oracle has the ability to store the spatial information about all these points. This project mainly deals with the track history of RFID tagged items. The track history of these items is displayed in the form of a map using a tool called mapviewer. MapViewer is a programmable tool for rendering maps using spatial data managed by Oracle Spatial.

Objective

The main objective of this project is to display the track history of the RFID tagged items in the form of a map.

Design

Spatial information is specified using two components: a location with respect to some origin and geometric space.

  • Location specifies where the data is located with respect to a two-,three- or four-dimensional coordinate space.
  • Space specifies the geometric structure of the data. Point, line and polygon are examples of possible shapes.

The SDO_GEOMETRY data type captures the location and shape information of data rows in a table. It can store a wide variety of spatial data, including the following:

  • Points
  • Line strings
  • Polygons
  • Collections

Points:

The simplest geometry is a point. A pointmay represent the location of a customer, a delivery site, or a competitor store.

Line Strings:

A line stringconnects multiple points. In general, roads, transportation networks, utility lines, and pipelines are represented as a line string type of SDO_GEOMETRY. If the line string is closed, then it is a ring otherwise it is just a line.

Polygons:

A polygon is specified by one or more rings (closed line strings) and is associated with an area. A polygon could represent a city boundary, a zip code area, or a buffer zone around a store site.

Collections:

A collection has multiple geometry elements. A collection could be heterogeneous-that is, it could be any combination of points, lines, and polygons. Alternatively, a collection could be homogeneous- that is, it may consist of elements of a single type. Specific types of such homogeneous collections are multipoint, multiline, or multipolygon collections.

In this project, I have created following table:

Table 1: Description of rfid_item_track table.

NAME / TYPE
ID / NUMBER(30)
ITEM_NAME / VARCHAR2(30)
TRACK / SDO_GEOMETRY
START_POINT / SDO_GEOMETRY
END_POINT / SDO_GEOMETRY
START_NAME / VARCHAR2(30)
END_NAME / VARCHAR2(30)

The ID and the ITEM_NAME in the above table represent the id and the item name of the item respectively. The data type of TRACK is SDO_GEOMETRY. TRACK stores the geometric information about the track of the item. START_POINT and END_POINT store the geometric information about the start and end points of the track respectively.START_NAME and END_NAME are introduced for the purpose of labeling the map in the map viewer.

The structure of SDO_GEOMETRY data type in oracle is as shown in table-2.

Table 2: Description of SDO_GEOMETRY data type in Oracle.

Name / Type
SDO_GTYPE / NUMBER
SDO_SRID / NUMBER
SDO_POINT / SDO_POINT_TYPE
SDO_ELEM_INFO / SDO_ELEM_INFO_ARRAY
SDO_ORDINATES / SDO_ORDINATE_ARRAY

SDO_GTYPE Attribute

This attribute describes the type of geometric shape modeled in the object. It has a distinct value to indicate whether the geometry is a point, a line string, a polygon, a multipoint, a multipolygon, a multiline, or an arbitrary collection. This attribute can be thought as a high-level description of the geometry object. The geometry object may itself be a combination of multiple elements, each of a different shape. But this attribute specifies the general type for the entire object.

The SDO_GTYPE is four-digit number structures as follows: D00T. The first and the last digits take different values based on dimensionality and shape of the geometry as described in Table-3. The second and third digits are set to 0.

Table 3: Values for D, T in the D00T Format of the SDO_GTYPE Attribute of SDO_GEOMETRY

Digit / Values
D (dimension of the geometry) / 2=Two-dimensional
3=Three-dimensional
4=Four-dimensional
T(shape/type of the geometry) / 0=Uninterpreted type
1=point
5=Multipoint
2=Line
6=Multiline
7=Multipolygon
4=Collection

The D in the D00T representation of the SDO_GTYPE is used to store the dimensionality of the geometry object.The T in the SDO_GTYPE specifies the type/shape of the geometry.

SDO_SRID Attribute

The attribute specifies the spatial reference system, or coordinate system, for the geometry.

SDO_POINT Attribute

This attribute is used to specify the location of a point geometry, such as the location of a customer. Table-4 illustrated the structure of SDO_POINT.

Table 4:Description of SDO_POINT_TYPE data type in Oracle

Name / Type
X / NUMBER
Y / NUMBER
Z / NUMBER

The SDO_GTYPE for a point geometry is set to D001.

SDO_ELEM_INFO and SDO_ORDINATES Attribute:

To store complex elements such as lines or polygons, we use other two structures in the SDO_GEOMETRY type, the SDO_ELEM_INFO and SDO_ORDINATES attributes. These attributes together allow us to specify different elements that compose a geometry: the SDO_ORDINATES stores the coordinates of the vertices in all elements of a geometry, and the SDO_ELEM_INFO specifies the type of elements and where they start in the SDO_ORDINATES.

The SDO_ORDINATE attribute store the attributes in all dimensions of all elements of a geometry. The SDO_ORDINATES attribute is of type SDO_ORDINATE_ARRAY, which is a collection of type VARRAY (variable-length-array). The VARRAY is useful for storing the points that describe a geometric shape in the proper order, so that no explicit order is needed when fetching that shape.

Schedule(as executed)

Spring 2006
1. Understanding … /
2. Design … /
3. Implement … /
4. Test … /
5. Demonstrate /
6. Document … /

Results and Analysis

A sample insert statement:

insert into rfid_item_track values(

14,

'Orange juice track',

SDO_GEOMETRY(2002, 8265, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(-150, 0, -110, 40, -100, 15, -40, 20, 10, -40, 40,

-30, 60, 15, 75, -50, 45, -80, 100, -75, 140, 21)),

SDO_GEOMETRY(2001, 8265, SDO_POINT_TYPE(-150, 0, NULL), NULL, NULL),

SDO_GEOMETRY(2001, 8265, SDO_POINT_TYPE(140, 21, NULL), NULL, NULL),

'start point',

'end point')

SQL> set heading off;SQL> select * from rfid_item_track where id=1;

When we run the above queries in SQLPLUS,we get the following output:

1 Orange juice track

SDO_GEOMETRY(2002, 8265, NULL, SDO_ELEM_INFO_ARRAY(1, 2, 1), SDO_ORDINATE_ARRAY(

-150, 0, -110, 40, -100, 15, -40, 20, 10, -40, 40, -30, 60, 15,

75, -50, 45, -80, 100, -75, 140, 21))

SDO_GEOMETRY(2001, 8265, SDO_POINT_TYPE(-150, 0, NULL), NULL, NULL)

SDO_GEOMETRY(2001, 8265, SDO_POINT_TYPE(140, 21, NULL), NULL, NULL)

start point end point

But, when the same query is run in mapviewer, the output is as follow:

Track history of an item with id=2

Track history of an item with id=3

The following steps have to be followed to view the output in mapviewer.

  1. The Oracle Mapviewer is online at
  2. click Demos then under On-line JSP Demos click jview.jsp to get to the
    "Simple Spatial Query Visualizer".
  3. A data source must be selected from the Datasource dropdown list. All the queries will be executed on the selected data source. In our case it is ‘gdl1_lidarread’.
  4. Up to three SQL queries, one for each text area, can be entered. Note that each query must select only one column or expression that is of SDO_GEOMETRY type. Do not end your SQL query with‘;’.
  5. Each query's results are rendered using the stroking and/or filling color you picked. The results of the first query will be drawn first, followed by those of query 2 and 3.
  6. Once a map has been displayed, you can click on the map image to zoom in, out or recenter. Each click will result in all of the queries being executed again.
  7. Use the Submit button to refresh or reset the map after modifying any of the following:
  8. Datasource name
  9. Any of the queries
  10. Color, translucency or label column setting for any of the queries
  11. The result geometries can also be labeled. To do this, the name of a column or expression supplying the label strings must be entered in the corresponding Label Column field, as well as the query's SELECT list.
  12. To change the size of the result map, simply enter new values (in pixel) in the map width and height fields. If you want the result map to be rendered in anti-aliased mode (often results in smoother maps), check the AA checkbox.

Conclusions

For this project I have considered the geographic data from roadways database and post offices database. It would be really great if we could produce the actual geographic data for our project using synthetic data generator.

Future Work

When we run the queries in mapviewer, we see the whole track at once. But it would be better if we could maintain some time gap between every two lines of a track so that we could virtually see the item moving.

In the output we could see only the labels of start point and end point. It would be great if we could label all the points in the track.

References

Kothuri.R, Godfrind.A, Beinat.E, “Pro Oracle Spatial”, Apress, 2004.

1