Archive for the 'Uncategorized' Category

A New PBBI Blog – Customer Experience

PBBI’s Director of Corporate Strategy discusses customer experience, something that all organizanations struggle with on a regular basis.

To read more and see our new corporate blog click here:

http://www.pbinsight.com/blog/details/living-customer-experience/

Come see MapInfo Professional v10.5 at the MapInfo UK User Group meeting!

This is just a quick note to let our U.K. customers know that we will be launching MapInfo Professional v10.5 at the MUGUKI meeting on June 23rd. The meeting takes place at the Savoy Place in London.

For more details on the agenda and to register please visit the Muguki web site at http://www.muguk.com

MapInfo Professional v10.5 Reads and Accesses Metadata!

In addition to sharing maps across the enterprise and via the cloud, MapInfo Professional v10.5 enables users to access even more data and services thanks to a Metadata Browser. Users will be able to search and open map files by only typing in a few keywords, making it easier to find the data they need. With the Metadata browser, organizations using MapInfo Professional can also connect to any publicly hosted data catalog.

The newest version will support the OCG Catalog Services Web (CSW) and also include features to help European customers meet INSPIRE requirements. Finally, MI Pro 10.5 enables you to connect to a catalog that your organization hosts. With MapInfo Professional and PBBI’s offerings, users will be able to set up and populate an internal or external searchable catalog.

Remember to check back here, or follow us on twitter to get more updates on MapInfo Professional v10.5!

MapInfo Professional v10.5 – Share intelligent maps through GeoPDF and via the cloud!

MapInfo Professional v10.5 is coming and we wanted to give you a heads up about one of the new features to be released before formally announcing the product at the Pitney Bowes Business Insights user conference (May 12-14).

The newest feature provides organizations with new and powerful ways to share maps across the enterprise and via the cloud, enhancing access to the tools and information necessary to make critical business decisions.

With MapInfo Professional v10.5, organizations can create and share dynamic maps that business users can interact with on a daily basis. For instance, users will be able to publish maps to the cloud through a  PBBI’s newest web mapping application, MapInfo Stratus.

PBBI has also enhanced MapInfo Professional’s PDF publishing options, introducing GeoPDF. With GeoPDF, it’s possible to publish both coordinate data as well as tabular information to a PDF file, giving users more flexibility to share information with their colleagues.

There is more to come in MapInfo Professional v10.5.  Remember to check back here, or follow us on twitter to get more updates on MapInfo Professional 10.5!

Envinsa: Logging REST Requests

by Minna Lunney

For logging SOAP-based requests, Envinsa provides powerful built-in configuration options accessible through the Enterprise Manager.  REST API requests can also be logged, but this must be done through a separate mechanism: namely, by enabling access logging for the application server in use.

Here is an example of configuring access logging within Tomcat, the default application server for Envinsa.

1) Shut down the Tomcat that contains the REST service for which logging is desired.

2) Browse to the Tomcat’s conf folder, and open server.xml.

3) Scroll down to the Host element.  Somewhere within the Host element, either add or uncomment a Valve element to define an access log.  For example:

<Host name=”localhost” appBase=”webapps”

unpackWARs=”true” autoDeploy=”true”

xmlValidation=”false” xmlNamespaceAware=”false”>

<!– Other items here –>

<Valve className=”org.apache.catalina.valves.AccessLogValve”

directory=”logs”  prefix=”localhost_access_log.” suffix=”.txt”

pattern=”%t %s %b %D %r”/>

<!– Other items here –>

</Host>

The directory attribute specifies where to store the access log.  The prefix and suffix attributes define what the beginning and end of the log file name should be.  A timestamp will be automatically inserted in between (ex. localhost_access_log.2010-02-02.txt).

The pattern attribute holds a list of strings that define what information to record in each log entry.  The pattern specified in the example above, when used in conjunction with the MapTiling service, produces a log entry that looks like this:

[02/Feb/2010:13:21:55 -0500] 200 79 516 GET /MapTiling/RESTService/getMaps?output=json HTTP/1.1

The available pattern strings are discussed here:

http://tomcat.apache.org/tomcat-5.5-doc/catalina/docs/api/org/apache/catalina/valves/AccessLogValve.html

Additional attributes for the AccessLogValve class are discussed here:

http://tomcat.apache.org/tomcat-5.5-doc/config/valve.html

4) Save and close server.xml.

5) Restart Tomcat.

For access logging in other commonly used application servers, please refer to the following resources.

WebLogic: http://download.oracle.com/docs/cd/E13196_01/platform/docs81/admin/admin.html#1072571

WebSphere: http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/ae/tcfg_intserver_access.html


MapXtreme Java: Improving Performance When Using a Database

by Minna Lunney

Anyone familiar with Java database connectivity (JDBC) knows that this powerful functionality often comes at a price, in the form of decreased application performance.  The steps required to retrieve information from a database (e.g. log in/connect, perform query, retrieve records, return records) tend to be more numerous and time-intensive than the steps required to retrieve the same information from a file stored on the local machine.

The following are performance-boosting tips specifically geared toward database interaction in MapXtreme Java.

Use Connection Pooling

Establishing a connection to a database takes time and resources.  A program that has to access a database several times is quickly bogged down if forced to create a new connection for each “trip.”  With a connection pool, you create database connections that are then recycled by your program and other users/processes that may need them.  For more information about connection pooling, please refer to Chapter 11 in the MapXtreme Java Developer Guide: http://reference.mapinfo.com/software/mapxtreme_java/english/4_8_2/dev_guide/MapXtremeJavaDeveloperGuide.pdf

Prior to following the directions in the above documentation, you will need to perform these steps to ensure MapXtreme Java can connect to your database:

1) Shut down the MXJ server and quit the Web/StandAlone Manager(s), if necessary.

2) Locate or download the appropriate JDBC driver for your database.  If the driver is in .zip format, change its extension to .jar.

3) Copy the database driver to the following locations:

- [MXJ_Home]/lib/client

- [MXJ_Home]/[Tomcat folder]/webapps/mapxtreme[ver]/WEB-INF/lib

4) Browse to [MXJ_Home]/bin. Modify both the StandAlone and Web .lax files to include your driver in the classpath (the lax.class.path variable at the top of the file).  Follow the same forward- and backslash convention that is used for the other .jar files in the classpath, and separate each entry with the proper delimiter.  As an example for Windows:

lax.class.path=C:\\MXTJ482/MapXtreme-4.8.2/lib/client;C:\\MXTJ482/MapXtreme-4.8.2/lib/client/ojdbc14.jar;C:\\MXTJ482/MapXtreme-4.8.2/lib/client/mxjclient.jar;

….

The changes will take effect the next time you start the Manager(s) and/or MXJ server.

Specify Table Metadata

When retrieving a map table from a database, MapXtreme Java requires some basic information about the table, such as its coordinate system, spatial column, and rendition columns (if any).  This information is referred to as “table metadata.”  If you don’t supply metadata, MapXtreme Java will query the MAPINFO.MAPINFO_MAPCATALOG table in your database to obtain it, which adds to the time and resources required to retrieve the database table.

There are two ways to manually provide MapXtreme Java with the table’s metadata.  If you’re accessing the table through the MapXtreme Java Manager’s Add Layer Wizard, you can supply the metadata on the “Specify Other Table or Query Information” screen.  Click Use the following settings and fill in as many of the fields as possible before clicking Next.

java1

Programmatically, you can provide metadata to the constructor of the TableDescHelper.  For example:

// Table information
String[] idColumns = {"mi_prinx"};
String table = "States";
boolean bUseQuotes = false;
String spatialCol = "GEOLOC";
String rendCol = null;
RenditionType perFeatureType = RenditionType.none;
String labelRendCol = null;
RenditionType perFeatureLabelType = RenditionType.none;
CoordSys csys = CoordSys.longLatWGS84;
int dimensions = 2;
String owner = "mary";
// Create a TableDescHelper
OraSoTableDescHelper tableTDH = new OraSoTableDescHelper(table,
 bUseQuotes, idColumns, spatialCol, rendCol, perFeatureType,
labelRendCol, perFeatureLabelType, csys, dimensions, owner);

Use Zoom and Visibility Constraints

By default, when displaying a map layer, MapXtreme Java will retrieve all records from the table, even if you are only viewing a portion of the layer.  Every time the map is operated on- pan, zoom in/out- MXJ will again retrieve all the features from the table before rendering the modified view.  When the map layer comes from a database, this can result in slow performance as potentially hundreds or thousands of records are returned each time the map is manipulated.  By setting zoom constraints on a layer, you limit MXJ to retrieving just those records that fall within the specified zoom range, and to retrieving no records if the map layer is not visible within a given map view.

Within the MapXtreme Java Manager, you can adjust zoom constraints by selecting the database layer within Layer Control, and clicking the Display button.  On the tab that appears, check Display within Zoom Range, enter the desired visibility range and distance units, and click OK.

java3

Programmatically, you can use the following methods of the FeatureLayer class to control a database layer’s visibility:

FeatureLayer dbLayer = (FeatureLayer) myMapJ.getLayers().get(“DB_LAYER”);
dbLayer.setZoomLayer(true);
dbLayer.setMinZoom(new Distance(0, LinearUnit.mile));
dbLayer.setMaxZoom(new Distance(10, LinearUnit.mile));

Use QueryParams – Retrieve Only the Attributes You Need

When performing a search against a database table, the QueryParams class gives you control over the type and quantity of data retrieved.  For example, you may only need to retrieve the value of the “Name” column for each feature, in which case returning all columns and geometries would be overkill.  You can specify your search as attribute-only, geometry-only, or some combination thereof.  The more specific you make your return criteria, the better the search will perform.  For more information about the use of this class, please refer to Chapter 12 of the MXJ Developer Guide:

http://reference.mapinfo.com/software/mapxtreme_java/english/4_8_2/dev_guide/MapXtremeJavaDeveloperGuide.pdf

Also helpful are the MXJ Javadocs: http://reference.mapinfo.com/software/mapxtreme_java/english/4_8_2/docs/api/index.html

Use Pass-Through Queries – Retrieve Only the Records You Need

When loading a database table, you can limit which features and attributes are retrieved with the use of a pass-through query.  For example, SELECT ID, Name, MI_GEOMETRY, Population FROM myuser.world WHERE Population > 100000000.

When using the MapXtreme Java Manager, a pass-through query can be specified within the Add Layer Wizard:

java4

Programmatically, a query can be defined within the constructor for the table’s TableDescHelper:

String sql = "SELECT SW_MEMBER, Longitude, Latitude, FROM Addresses WHERE Outfirm='OFFICE BLDG'";
CoordSys coordsys = CoordSys.longLatWGS84;
String[] idColumns = {"SW_MEMBER"};
XYTableDescHelper xyTDH = new XYTableDescHelper(sql,
 idColumns, "Longitude", "Latitude", null, RenditionType.none,
null, RenditionType.none, coordsys);

For more information, see Chapter 12 in the MXJ Developer Guide: http://reference.mapinfo.com/software/mapxtreme_java/english/4_8_2/dev_guide/MapXtremeJavaDeveloperGuide.pdf

Use QueryBuilders

If you wish to search a database table that has been defined by a pass-through query (as discussed above), you must associate an instance of the QueryBuilder class with the table.  The QueryBuilder can refine your search and limit the amount of information that is retrieved.  Sample QueryBuilder classes are provided in the examples/client/querybuilders directory on a default MXJ install.  You can use these classes directly, or implement your own QueryBuilder class to suit your specific needs.  More information is available in Chapter 12 of the MXJ Developer Guide:

http://reference.mapinfo.com/software/mapxtreme_java/english/4_8_2/dev_guide/MapXtremeJavaDeveloperGuide.pdf

Use Database Indexes

Creating indexes within the database from which mapping data will be retrieved will improve the performance of all database operations.  For instructions on creating an index, please consult the documentation for your specific database(s).

Keep Layers Simple

Tables with complex geometries will be more resource-intensive than tables that contain simpler geometries.  If possible, use MapInfo Professional to perform snap/thin operations on complex features before uploading a table to your database.  Directions for feature thinning in MapInfo Professional can be found in this Knowledge Base document: http://testdrive.mapinfo.com/techsupp/miprod.nsf/kbase_by_product/C04149D2C49B7AE185256AAB006E0349

For more information on how MapInfo Professional can be used to streamline tables, please refer to the MIPro User Guide: http://reference.mapinfo.com/software/mapinfo_pro/english/10/MapInfoProfessionalUserGuide.pdf

MapInfo Professional: Creating Seamless Layers

by Minna Lunney

Seamless layers allow you to treat several map layers as one for purposes of labeling and changing display attributes.  They are especially convenient when used to combine large numbers of related TAB files.  For instance, one could combine 50 individual state highway layers into a single, seamless highway layer for the United States.  The individual layers will still exist as separate entities; the seamless layer simply points to the individual layer files, and does not override or merge them in any way.

Note: For best results, the seamless layer and all constituent layers should reside within the same directory.

Here’s how to create a seamless layer:

1) In MapInfo Professional, open all of the layers you wish to use for your seamless layer.  Use Layer Control to add them all to one map window.  In this example, we’re using parks layers for New York, Pennsylvania, and Ohio.

Seemless layer blog 1

Seemless layer blog 2

2) In the top menu bar, go to Tools > Tool Manager.  Find the Seamless Table Manager tool.  Check Loaded and Autoload, if not already checked, then click OK.

Seemless layer blog 3

3) Go to Tools > Seamless Manager > New Seamless Table.  Name and save the seamless layer to the same directory where the constituent tables reside

Seemless layer blog 4

The newly created seamless layer looks like any other TAB file, but as mentioned, it acts as a pointer to the data contained in the constituent tables.  This is evident when you compare the file sizes of the different tables.  The seamless table won’t be nearly as large as any of its constituent tables.

Seemless layer blog 5

Seamless layers can also be used in programs other than MapInfo Professional, such as MapXtreme Java and MapXtreme .NET.  For more information about seamless layers, please consult the MapInfo Professional User Guide:

http://reference.mapinfo.com/software/mapinfo_pro/english/10/MapInfoProfessionalUserGuide.pdf

Online Video Tutorials & Training

By Chris Brigger, Global Training Content Manager

Many customers have told us that budgets for travel and training are shrinking, making alternative training methods important.  In response, the PBBI Education Department is working on developing a series of online tutorial video clips. The short clips focus on a specific task or feature of various aspects of our software.

Our first series of online tutorials were posted to support the launch of MapInfo Professional version 10, and focus on the new user interface elements. These can be located online at: http://www.pbinsight.com/support/training/video-tutorials/. In the coming months, we will expand our online library to include tutorials for additional PBBI products.

PBBI’s Insights User Conference

Insights User Conference website is live – Register before 12/31 to get $200 off registration fee – http://insights10.pbbusinessinsight.com/

Development Tips from our Experts!

MapXtreme Java 4.8.2: Improving rendering quality

by: Minna Lunney

Obtaining the best looking maps possible starts with high-quality vector data and rasters, but is also heavily influenced by the rendering engine and style settings.  Below are a couple of simple tricks you can use within MapXtreme Java to enhance the quality of maps displayed on screen or saved as an image.

Enable Anti-aliasing

Anti-aliasing adds gray or colored pixels to blend with the original pixels within an image, resulting in lines and edges that are less jagged. This feature can be enabled within the Web and StandAlone Managers, as well as within your Java programs.

To use anti-aliasing with the MXJ Manager (Web or StandAlone), follow these steps:

1) Browse to [MXJ_Home]/bin and open MapXtremeJavaManager-Web.lax or MapXtremeJavaManager-StandAlone.lax for editing.

2) Add the following lines to the end of the LAX file:

#

# ENABLE ANTI-ALIASING

#

lax.nl.java.option.additional=-Dcom.mapinfo.render.quality=true

3) Save and close the LAX file.

Within an MXJ program, you can direct your ImageRequestComposer object to use anti-aliasing with the following line of code:

myImageRequestComposer.setRendering(Rendering.QUALITY);

Below are screenshots that illustrate the difference anti-aliasing makes.

Without anti-aliasing:

Without Anti-Aliasing

Without Anti-Aliasing

With anti-aliasing:

With Anti-Aliasing

With Anti-Aliasing

Adjust line caps and joins

This is a technique for maps that contain line features, such as highways.  Line renditions share a number of properties, but two in particular are of interest here: stroke-linecap (what the ends of a line segment should look like) and stroke-linejoin (what the line should look like at the junction of two segments).

Here are the available stroke-linecap options:

available stroke-linecap options

available stroke-linecap options

Here are the available stroke-linejoin options:

Screenshot 6

By default, MXJ line styles will use “butt” for stroke-linecap and “miter” for stroke-linejoin.  This may lead to jagged roads, especially at higher zoom levels.

Screenshot 4

To remedy this, open the MDF for the map in a text editor.  Find every instance of the words “miter” and “butt,” and replace them with the word “round.”  For example, the following style tag:

<style fill-opacity=”1.0″ stroke=”#990000″ stroke-opacity=”1.0″ stroke-width=”2.0″ stroke-linejoin=”miter” stroke-linecap=”butt” stroke-dasharray=”none” marker-continuous=”none” parallel-line=”none” symbol-mode=”font” symbol-foreground-opacity=”1.0″ symbol-background-opacity=”1.0″ />

Would be changed to this:

<style fill-opacity=”1.0″ stroke=”#990000″ stroke-opacity=”1.0″ stroke-width=”2.0″ stroke-linejoin=”round” stroke-linecap=”round” stroke-dasharray=”none” marker-continuous=”none” parallel-line=”none” symbol-mode=”font” symbol-foreground-opacity=”1.0″ symbol-background-opacity=”1.0″ />

Once this is done, save and close the MDF, then try rendering it again.  You should see that the lines are much smoother.

Screenshot 5

Here are the available stroke-linejoin options: