Class IAFloorPlan
- java.lang.Object
-
- com.indooratlas.android.sdk.resources.IAFloorPlan
-
- All Implemented Interfaces:
Parcelable
public class IAFloorPlan extends Object implements Parcelable
IAFloorPlan contains the information required to place a floor plan bitmap to Earth's surface
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator
CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
IAFloorPlan(Parcel in)
Do not use this constructor directly.IAFloorPlan(String id, String name, String url, int bitmapWidth, int bitmapHeight, int floorLevel, double[] pixelToWgs, double[] wgsToPixel)
Constructs anIAFloorPlan
instance based on parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointF
coordinateToPoint(IALatLng coord)
Converts geographical coordinates to the corresponding point of pixel coordinatesint
describeContents()
boolean
equals(Object o)
Matrix
getAffinePix2wgs()
Matrix
getAffineWgs2pix()
float
getBearing()
int
getBitmapHeight()
int
getBitmapWidth()
IALatLng
getBottomLeft()
IALatLng
getBottomRight()
IALatLng
getCenter()
int
getFloorLevel()
float
getHeightMeters()
String
getId()
float
getMetersToPixels()
String
getName()
float
getPixelsToMeters()
IALatLng
getTopLeft()
IALatLng
getTopRight()
String
getUrl()
float
getWidthMeters()
int
hashCode()
IALatLng
pointToCoordinate(PointF pointf)
Converts a point of pixel coordinates to the corresponding geographical coordinatesString
toString()
void
writeToParcel(Parcel out, int flags)
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator CREATOR
-
-
Constructor Detail
-
IAFloorPlan
public IAFloorPlan(String id, String name, String url, int bitmapWidth, int bitmapHeight, int floorLevel, double[] pixelToWgs, double[] wgsToPixel)
Constructs anIAFloorPlan
instance based on parameters. Do not call this constructor directly.IAFloorPlans
are obtained from the the SDK inIARegion
s- Parameters:
id
- floor plan idname
- descriptive name of floor planurl
- URL for bitmap resourcebitmapWidth
- width of bitmap in pixelsbitmapHeight
- height of bitmap in pixelsfloorLevel
- the logical floor level of buildingpixelToWgs
- 6 float values used to initialize pixelToWgs affinity matrixwgsToPixel
- 6 float values used to initialize wgsToPixel affinity matrix
-
IAFloorPlan
protected IAFloorPlan(Parcel in)
Do not use this constructor directly.
-
-
Method Detail
-
describeContents
public int describeContents()
- Specified by:
describeContents
in interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel out, int flags)
- Specified by:
writeToParcel
in interfaceParcelable
-
getId
public String getId()
- Returns:
- Floor plan id
-
getName
public String getName()
- Returns:
- Floor plan name
-
getUrl
public String getUrl()
- Returns:
- URL for the bitmap resource
-
getBitmapWidth
public int getBitmapWidth()
- Returns:
- Width of the bitmap in pixels
-
getBitmapHeight
public int getBitmapHeight()
- Returns:
- Height of the bitmap in pixels
-
getFloorLevel
public int getFloorLevel()
- Returns:
- The logical floor level of the building as defined in the mapping phase.
-
getAffineWgs2pix
public Matrix getAffineWgs2pix()
- Returns:
- Affine transformation matrix used for WGS coordinate to pixel point conversions.
-
getAffinePix2wgs
public Matrix getAffinePix2wgs()
- Returns:
- Affine transformation matrix used for pixel point to WGS coordinate conversions.
-
getPixelsToMeters
public float getPixelsToMeters()
- Returns:
- Pixels to meters conversion factor. Multiply distance in pixels by this factor to get distance in meters.
-
getMetersToPixels
public float getMetersToPixels()
- Returns:
- Meters to pixels conversion factor Multiply distance in meters by this factor to get distance in pixels.
-
getWidthMeters
public float getWidthMeters()
- Returns:
- Width of the floor plan bitmap placed on the surface of Earth in meters
-
getHeightMeters
public float getHeightMeters()
- Returns:
- Height of the floor plan bitmap placed on the surface of Earth in meters
-
getBearing
public float getBearing()
- Returns:
- The approximate bearing of left side of floor plan in degrees East of true North.
-
getCenter
public IALatLng getCenter()
- Returns:
- Corresponding WGS84 coordinate of center of the floor plan bitmap placed on the surface of Earth
-
getTopLeft
public IALatLng getTopLeft()
- Returns:
- Corresponding WGS84 coordinates of top left corner of the floor plan bitmap placed on the surface of Earth
-
getBottomLeft
public IALatLng getBottomLeft()
- Returns:
- Corresponding WGS84 coordinate of bottom left corner of floor plan bitmap placed on the surface of Earth
-
getTopRight
public IALatLng getTopRight()
- Returns:
- Corresponding WGS84 coordinate of top right corner of the floor plan bitmap placed on the surface of Earth
-
getBottomRight
public IALatLng getBottomRight()
- Returns:
- Corresponding WGS84 coordinate of bottom right corner of the floor plan bitmap placed on the surface of Earth
-
coordinateToPoint
public PointF coordinateToPoint(IALatLng coord)
Converts geographical coordinates to the corresponding point of pixel coordinates- Parameters:
coord
- WGS84 coordinate- Returns:
- corresponding pixel point on the floor plan bitmap
-
pointToCoordinate
public IALatLng pointToCoordinate(PointF pointf)
Converts a point of pixel coordinates to the corresponding geographical coordinates- Parameters:
pointf
- pixel point on the floor plan bitmap- Returns:
- corresponding WGS84 coordinate
-
-