The UsZcta2010 Database provides the ZIP Code Tabulation Area (or equivalent) within the United States for a given location (latitude and longitude).

A census ZIP Code Tabulation Area (ZCTA) is a statistical region corresponding to a US Postal Service ZIP Code used by the US Census Bureau to collect statistics about local residents. Places are outside the US Census Bureau's hierarchy of states, counties, county subdivisions, census tracts, census block groups, and census blocks. Each ZCTA is constructed by combining the US Census Blocks in which a given ZIP code is the most common ZIP code in use. Consequently, a given ZCTA may include a small number of addresses that use a different ZIP code.

Using the UsZcta2010 Database is simple: you give latitude and longitude and the Database returns the ZIP Code Tabulation Area's name, and several other identifying codes and basic statistics. It also returns more than 100 key demographic variables from the 2010 US Census, including detailed information on the age, sex, and race of the residents, as well as information about households. For a complete listing of the data returned, please see the Returned Values Section below.

This Database is based on data from the United States Census Bureau. In addition to repackaging that data in an easy-to-use format for Web developers and Java and .NET programmers, AskGeo also adds a high-performance spatial index that allows for extremely low-latency queries. Please see the Performance Section below for details on how fast this Database is.

Unlike most of the other US-Census-based Databases, this Database does not have high and low fidelity versions. The only version available is of the high-fidelity type, which is the highest accuracy map data yet incorporated into AskGeo.

US Zip Code Tabulation Areas Map

The map below was generated from the UsZcta2010 Database:

The colors for each ZIP Code Tabulation Area have been selected randomly to provide contrast.

Please also note that for locations not inside any ZIP Code Tabulation Area the Database returns the nearest ZIP Code Tabulation Area up to 20 km away. This "snap-to" distance is fixed for the Web API but can be customized by users of the AskGeo Java and .NET Libraries.

Database Statistics

The UsZcta2010 Database consists of 33,120 ZIP Code Tabulation Areas (32,989 of which are populated) with the following statistical characteristics:

PopulationArea
Minimum0.00 people0.00 square miles
First Quartile727 people9.3 square miles
Median2,766 people36 square miles
Third Quartile12,791 people89 square miles
Maximum113,916 people13,160 square miles

Map Accuracy

Unlike the other Databases based on the US Census data, the UsZcta2010 Database is only available in the high-fidelity version. This is the most accurate map data available from the US Census Bureau. Though the Census Bureau does not specify an explicit scale, they do quote source materials with scales of 1:100,000 and 1:24,000, and an Accuracy Improvement Project that led to an average error of just 7.6 meters. Our inspection of the data also reveals a high level of consistency with Google Maps and Open Street Map.

Returned Values

The UsZcta2010 Database returns a large number of parameters about the ZIP Code Tabulation Area in question. While all these parameters are returned with a single call to the Web API, for performance reasons the Java and .NET Libraries divide them into three separate groups.

The first group is common to all the Databases and pertains to the query point's relationship to the map region from which the returned values were drawn.

KeyDescriptionUnitsType
AskGeoId The internally-used AskGeo unique ID for the returned polygon n/aint
IsInside Whether or not the query point is inside the returned polygon n/aboolean
MinDistanceKm The distance from the query point to the nearest interior point of the returned polygon kilometersfloat

The second group provides some basic information about the ZIP Code Tabulation Area.

KeyDescriptionUnitsType
ZctaCode US census ZCTA (Zip Code Tabulation Area) code (for example, 94111, 90210, 10019) n/aString
GeoId US census unique geographic ID n/aString
ClassCode US FIPS 55 class code n/aString
FeatureClassCode US census MAF/TIGER feature class code n/aString
FunctionalStatus US census functional status code n/aString
LandAreaSqM US census land area (square meters) square metersfloat
WaterAreaSqM US census water area (square meters) square metersfloat
LatitudeDeg Latitude of interior point (degrees) degreesfloat
LongitudeDeg Longitude of interior point (degrees) degreesfloat

The third group returns selected demographic census data from the official 2010 Census for the ZIP Code Tabulation Area.

KeyDescriptionUnitsType
CensusGeoId Unique geographic identifier n/aString
CensusGeoLevel Geographic level code n/aString
CensusEsriId ESRI entity code n/aString
CensusGeoCode US Census entity code n/aString
CensusAreaName Entity name n/aString
CensusStateAbbreviation State abbreviation n/aString
CensusTotalPopulation Total Population peoplefloat
CensusTotalPopulationIn2000 Total Population in 2000 peoplefloat
CensusTotalPopulationChange2000To2010 Change in Population 2000-2010 peoplefloat
CensusTotalPopulationPercentChange2000To2010 Percent Change in Population 2000-2010 percentfloat
CensusSexMale Sex: Males peoplefloat
CensusSexPercentMale Sex: Percent Males percentfloat
CensusSexFemale Sex: Females peoplefloat
CensusSexPercentFemale Sex: Percent Females percentfloat
CensusPeoplePerSqMi Population Density people per square milefloat
CensusAge0To4 Age: Under 5 Years peoplefloat
CensusAgePercent0To4 Age: Percent Under 5 Years percentfloat
CensusAge5To9 Age: Age 5 to 9 Years peoplefloat
CensusAgePercent5To9 Age: Percent Age 5 to 9 Years percentfloat
CensusAge10To14 Age: 10 to 14 Years peoplefloat
CensusAgePercent10To14 Age: Percent 10 to 14 Years percentfloat
CensusAge15To17 Age: 15 to 17 Years peoplefloat
CensusAgePercent15To17 Age: Percent 15 to 17 Years percentfloat
CensusAge18To19 Age: 18 to 19 Years peoplefloat
CensusAgePercent18To19 Age: Percent 18 to 19 Years percentfloat
CensusAge20To24 Age: 20 to 24 Years peoplefloat
CensusAgePercent20To24 Age: Percent 20 to 24 Years percentfloat
CensusAge25To34 Age: 25 to 34 Years peoplefloat
CensusAgePercent25To34 Age: Percent 25 to 34 Years percentfloat
CensusAge35To44 Age: 35 to 44 Years peoplefloat
CensusAgePercent35To44 Age: Percent 35 to 44 Years percentfloat
CensusAge45To54 Age: 45 to 54 Years peoplefloat
CensusAgePercent45To54 Age: Percent 45 to 54 Years percentfloat
CensusAge55To59 Age: 55 to 59 Years peoplefloat
CensusAgePercent55To59 Age: Percent 55 to 59 Years percentfloat
CensusAge60To64 Age: 60 to 64 Years peoplefloat
CensusAgePercent60To64 Age: Percent 60 to 64 Years percentfloat
CensusAge65To74 Age: 65 to 74 Years peoplefloat
CensusAgePercent65To74 Age: Percent 65 to 74 Years percentfloat
CensusAge75To84 Age: 75 to 84 Years peoplefloat
CensusAgePercent75To84 Age: Percent 75 to 84 Years percentfloat
CensusAgeOver85 Age: 85 Years and Over peoplefloat
CensusAgePercentOver85 Age: Percent 85 Years and Over percentfloat
CensusAgeMedianAge Age: Median Age yearsfloat
CensusAgeUnder18 Age: 0 to 17 Years peoplefloat
CensusAgePercentUnder18 Age: Percent 0 to 17 percentfloat
CensusAge18To24 Age: 18 to 24 Years peoplefloat
CensusAgePercent18To24 Age: Percent 18 to 24 Years percentfloat
CensusAge25To44 Age: 25 to 44 Years peoplefloat
CensusAgePercent25To44 Age: Percent 25 to 44 Years percentfloat
CensusAge45To64 Age: 45 to 64 Years peoplefloat
CensusAgePercent45To64 Age: Percent 45 to 64 Years percentfloat
CensusAgeOver62 Age: 62 Years and Over peoplefloat
CensusAgePercentOver62 Age: Percent 62 Years and Over percentfloat
CensusAgeOver65 Age: 65 Years and Over peoplefloat
CensusAgePercentOver65 Age: Percent 65 Years and Over percentfloat
CensusAgeOver18 Age: 18 Years and Over peoplefloat
CensusAgePercentOver18 Age: Percent 18 Years and Over percentfloat
CensusAgeOver18Male Age: Males 18 Year and Over peoplefloat
CensusAgePercentOver18Male Age: Percent Males 18 Years and Over percentfloat
CensusAgeOver18Female Age: Females 18 Year and Over peoplefloat
CensusAgePercentOver18Female Age: Percent Females 18 Years and Over percentfloat
CensusAgeOver21 Age: 21 Years and Over peoplefloat
CensusAgePercentOver21 Age: Percent 21 and Over percentfloat
CensusAge15To19 Age: 15 to 19 Years peoplefloat
CensusAgePercent15To19 Age: Percent 15 to 19 Years percentfloat
CensusAgeOver65Male Age: Males 65 and Over peoplefloat
CensusAgePercentOver65Male Age: Percent Males 65 and Over percentfloat
CensusAgeOver65Female Age: Females 65 and Over peoplefloat
CensusAgePercentOver65Female Age: Percent Females 65 and Over percentfloat
CensusRaceOneRaceOnly Race: One Race peoplefloat
CensusRacePercentOneRaceOnly Race: Percent One Race percentfloat
CensusRaceWhiteOnly Race: White peoplefloat
CensusRacePercentWhiteOnly Race: Percent White percentfloat
CensusRaceBlackOnly Race: Black or African American peoplefloat
CensusRacePercentBlackOnly Race: Percent Black or African American percentfloat
CensusRaceIndian Race: American Indian and Alaska Native peoplefloat
CensusRacePercentIndian Race: Percent American Indian and Alaska Native percentfloat
CensusRaceAsianOnly Race: Asian peoplefloat
CensusRacePercentAsianOnly Race: Percent Asian percentfloat
CensusRaceHawaiianPIOnly Race: Native Hawaiian and Other Pacific Islander peoplefloat
CensusRacePercentHawaiianPIOnly Race: Percent Native Hawaiian and Other Pacific Islander percentfloat
CensusRaceOtherOnly Race: Some Other Race peoplefloat
CensusRacePercentOtherOnly Race: Percent Some Other Race percentfloat
CensusRaceMultiRace Race: Multi Race: Persons reporting more than one race peoplefloat
CensusRacePercentMultiRace Race: Percent Multi Race: Persons reporting more than one race percentfloat
CensusHispanicTotalPopulation Hispanic: Hispanic or Latino (of any race) peoplefloat
CensusHispanicPercentHispanic Hispanic: Percent Hispanic or Latino (of any race) percentfloat
CensusHispanicMexican Hispanic: Mexican peoplefloat
CensusHispanicPercentMexican Hispanic: Percent Mexican percentfloat
CensusHispanicPuertoRican Hispanic: Puerto Rican peoplefloat
CensusHispanicPercentPuertoRican Hispanic: Percent Puerto Rican percentfloat
CensusHispanicCuban Hispanic: Cuban peoplefloat
CensusHispanicPercentCuban Hispanic: Percent Cuban percentfloat
CensusHispanicOtherHispanic Hispanic: Other Hispanic or Latino peoplefloat
CensusHispanicPercentOtherHispanic Hispanic: Percent Other Hispanic or Latino percentfloat
CensusHispanicNonHispanic Hispanic: Not Hispanic or Latino peoplefloat
CensusHispanicPercentNonHispanic Hispanic: Percent Not Hispanic or Latino percentfloat
CensusHispanicWhiteNonHispanic Hispanic: White Alone Not Hispanic peoplefloat
CensusHispanicPercentWhiteNonHispanic Hispanic: Percent White Alone Not Hispanic percentfloat
CensusHouseholdsTotal Households: Total Households householdsfloat
CensusHouseholdsTotalFamilies Households: Family Households (Families) householdsfloat
CensusHouseholdsPercentFamilies Households: Percent Family Households (Families) percentfloat
CensusHouseholdsFamilyKidsUnder18 Households: With Own Children Under 18 Years householdsfloat
CensusHouseholdsPercentFamilyKidsUnder18 Households: Percent With Own Children Under 18 Years percentfloat
CensusHouseholdsMarriedCouple Households: Married Couple Family householdsfloat
CensusHouseholdsPercentMarriedCouple Households: Percent Married Couple Family percentfloat
CensusHouseholdsMarriedCoupleKidsUnder18 Households: With Own Children Under 18 Years householdsfloat
CensusHouseholdsPercentMarriedCoupleKidsUnder18 Households: Percent With Own Children Under 18 Years percentfloat
CensusHouseholdsFemaleHouseholder Households: Female householder No Husband Present householdsfloat
CensusHouseholdsPercentFemaleHouseholder Households: Percent Female householder No Husband Present percentfloat
CensusHouseholdsSingleMoms Households: With Own Children Under 18 Years householdsfloat
CensusHouseholdsPercentSingleMoms Households: Percent With Own Children Under 18 Years percentfloat
CensusHouseholdsNonFamily Households: Non Family Households householdsfloat
CensusHouseholdsPercentNonFamily Households: Percent Non Family Households percentfloat
CensusHouseholdsUnmarriedPartner Households: Unmarried Partner Households householdsfloat
CensusHouseholdsPercentUnmarriedPartner Households: Percent Unmarried Partner Households percentfloat
CensusHouseholdsSameSexPartner Households: Same-Sex Unmarried Partner Households householdsfloat
CensusHouseholdsPercentSameSexPartner Households: Percent Same-Sex Unmarried Partner Households percentfloat
CensusHouseholdsLivingAlone Households: Householder Living Alone householdsfloat
CensusHouseholdsPercentLivingAlone Households: Percent Householder Living Alone percentfloat
CensusHouseholdsHouseholderOver65 Households: Householder 65 Years and Over householdsfloat
CensusHouseholdsPercentHouseholderOver65 Households: Percent Householder 65 Years and Over percentfloat
CensusHouseholdsHouseholdsWithUnder18 Households: Households With Individuals Under 18 Years householdsfloat
CensusHouseholdsPercentHouseholdsWithUnder18 Households: Percent Households With Individuals Under 18 Years percentfloat
CensusHouseholdsWithOver65 Households: Households With Individuals 65 Years and Over householdsfloat
CensusHouseholdsPercentWithOver65 Households: Percent Households With Individuals 65 Years and Over percentfloat
CensusHouseholdsAverageHouseholdSize Households: Average Household Size peoplefloat
CensusHouseholdsAverageFamilySize Households: Average Family Size peoplefloat

Java Library

All AskGeo Java Libraries are compatible with Java 6, have no external dependencies, and are thread safe. Each Database comes with an associated Data File that must provided at constructor time to populate the internal data structures.

The libraries come in both double and single (float) precision versions, with the former consuming just under twice the resident memory of the latter. For reference, the single precision version is accurate to about 2.4 meters, which is more than sufficient for most applications.

If you are interested in purchasing this Library or gaining access to the Web API, please see the:

Price List

Java Documentation

There are only three classes that you need to be aware of to use the AskGeo UsZcta2010 Java Library, and only the first two are essential:

class UsZctaMap

Contains map data and allows queries on the Database.

class UsZctaResult

Embodies the result of a query on a UsZctaMap instance.

enum CensusField

Enumeration of the result fields taken from the 2010 US Census.

They are described in the sections that follow.

The method signatures listed in this section are for the single precision (float) version of the library. For the double precision version, just replace float with double.

Please note that the documentation below is intended to provide you with an easy-to-understand presentation of the essentials of how to use the AskGeo UsZcta2010 Java Library.

For full documentation of the classes included, please see the:

Full Java Docs

UsZctaMap

The UsZctaMap class stores the map data and exposes a query method to find the ZIP Code Tabulation Area and related metadata at a given latitude and longitude. Because each UsZctaMap instance is quite large, we recommend instantiating a single static instance in your project. The methods that you will need to use are as follows.

class UsZctaMap {
static UsZctaMap create(InputStream dataFileStream)
Factory method for building a UsZctaMap instance.
  • InputStream dataFileStream: Input Stream of the Data File to be read to create this map
UsZctaResult findResult(float latDeg, float lonDeg)
Query method returns a UsZctaResult instance for a given latitude and longitude. Returns null if no result is found.
  • float latDeg: Latitude of the query point (degrees)
  • float lonDeg: Longitude of the query point (degrees)
// Additional methods exist in this class; for complete documentation, please see the Full Java Docs
}

UsZctaResult

The UsZctaResult class embodies the result of a query on a UsZctaMap instance. All of the results listed in the Returned Values Section may be accessed using an accessor whose method name consists of "get" followed by the Key parameter from the Returned Values tables. Those tables also specify the type of the returned value. For example, here are several important accessors:

class UsZctaResult {
String getZctaCode()
Returns the name of the ZIP Code Tabulation Area.
float GetCensusTotalPopulation()
Returns the total population in the ZIP Code Tabulation Area.
float GetCensusAgeMedianAge()
Returns the median age of the residents of the ZIP Code Tabulation Area.
// Additional methods exist in this class; for complete documentation, please see the Full Java Docs
}
Note: these are just a few of literally hundreds of accessors listed above in the Returned Values Section.

CensusField

The CensusField enum lists the fields taken from the 2010 US Census that are reported for each ZIP Code Tabulation Area. These may be used with the UsZctaResult to access these data if, for whatever reason, the more traditional accessors are not suitable to the application at hand. For example, some applications might result in having a list of desired fields, which could be represented as a list of CensusField members, and accessed in a for loop.

The following methods on the UsZctaResult class work with this enum:

class UsZctaResult {
String getCensusField(CensusField field)
Returns the String representation of the given 2010 US Census field, or null or an empty String if that field is missing.
  • CensusField field: The field to look up
float getCensusFieldAsFloat(CensusField field)
Returns the float representation of the given 2010 US Census field, or Float.NaN if that field is missing.
  • CensusField field: The field to look up
// Additional methods exist in this class; for complete documentation, please see the Full Java Docs
}

Please note that if you are just trying to access a couple of fields that are known at compile time, it is probably much easier to use the direct accessors documented here.

Java Example

The following is a complete example program demonstrating the use of the AskGeo UsZcta2010 Java Library.

import com.askgeo.flt.base.AcsField;
import com.askgeo.flt.us.census2010.low.UsZctaMap;
import com.askgeo.flt.us.census2010.low.UsZctaResult;

import java.io.FileInputStream;

public class UsCensusExample {
    static float[][] examplePoints = {{37f, -122f}, {42f, -89f}};
    static String license = "INSERT YOUR LICENSE STRING HERE";
    static String dataFilePath = "askgeo-us-state-2010-low-1.1.0.dat";

    public static void main(String[] args) {
        try {
            UsZctaMap map = UsZctaMap.create(new FileInputStream(dataFilePath));
            map.authorize(license);
            for (float[] point : examplePoints) {
                UsZctaResult result = map.findResult(point[0], point[1]);
                String name = result.getZctaCode();
                float population = result.getCensusTotalPopulation();
                float medianAge = result.getCensusAgeMedianAge();
                float medianIncome = result.getAcsFieldAsFloat(AcsField.AcsHouseholdIncomeMedian);
                System.out.println(" Latitude: " + point[0] +
                        ", Longitude: " + point[1] +
                        ", Name: " + name +
                        ", Population: " + population +
                        ", Median Age: " + medianAge +
                        ", Median Income: " + medianIncome);
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}

Please note that the ACS accessors are present on the UsZctaResult object but that they always return null or Float.NaN, as we have been unable to located ACS data aggregated on a ZCTA level. If we find such data in future, we will add it to a future version of the UsZcta2010 AskGeo Java and .NET Libraries.

Java Library Performance and Memory Consumption

AskGeo was designed from the ground up to be high performance. Our custom spatial index delivers blazing-fast response times. Furthermore, we've designed the AskGeo Java Libraries to be thread safe and to not utilize synchronized methods or statements in the performance-critical query code. This means that computers with multiple processors or cores can take full advantage of those cores to deliver even faster performance.

We tested the performance of the Library using a single thread on a computer with an Intel Core i7 3.33 GHz running 64-bit Windows 7. For each version of the library, we tested:

Construction Time

The time it took to construct an instance of the UsZcta2010 Database object.

Per-Query Time

The average response time for a single query. This was measured by running 100,000 queries, randomly distributed over the full extent of the map.

Memory

Resident memory of a UsZcta2010 Database instance, as estimated by measuring the JVM's used memory after running the GC when running a simple test application containing only the map. This will lead to a slight over-estimate of the resident memory because it will include the overhead of the test application.

Data File Size

The file size of the Data File associated with this Database.

PrecisionConstruction TimePer-Query TimeMemoryData File Size
Single 46.10 seconds 3.61e-04 seconds 475.0 MB331.9 MB
Double 49.20 seconds 1.82e-03 seconds 869.9 MB331.9 MB

.NET Library

All AskGeo .NET Libraries are compatible with .NET 4 and are thread safe. Each Database comes with an associated Data File that must provided at constructor time to populate the internal data structures. Except for a few small changes to be more consistent with .NET style and coding conventions, the AskGeo .NET Libraries are a direct port of the AskGeo Java Libraries.

Where relevant both double and single (float) precision versions of the various classes are provided, with the former consuming just under twice the resident memory of the latter. For reference, the single precision version is accurate to about 2.4 meters, which is more than sufficient for most applications.

If you are interested in purchasing this Library or gaining access to the Web API, please see the:

Price List

.NET Documentation

There are only three classes that you need to be aware of to use the AskGeo UsZcta2010 .NET Library, and only the first two are essential:

class UsZctaMap

Contains map data and allows queries on the Database.

class UsZctaResult

Embodies the result of a query on a UsZctaMap instance.

class CensusField

Enumerates (with static public members) the result fields taken from the 2010 US Census.

They are described in the sections that follow.

The method signatures listed in this section are for the single precision (float) version of the library. For the double precision version, just replace float with double.

Please note that the documentation below is intended to provide you with an easy-to-understand presentation of the essentials of how to use the AskGeo UsZcta2010 .NET Library.

For full documentation of the classes included, please see the:

Full .NET Docs

UsZctaMap

The UsZctaMap class stores the map data and exposes a query method to find the ZIP Code Tabulation Area and related metadata at a given latitude and longitude. Because each UsZctaMap instance is quite large, we recommend instantiating a single static instance in your project. The methods that you will need to use are as follows.

class UsZctaMap {
static UsZctaMap Create(Stream dataFileStream)
Factory method for building a UsZctaMap instance.
  • Stream dataFileStream: Input Stream of the Data File to be read to create this map
UsZctaResult FindResult(float latDeg, float lonDeg)
Query method returns a UsZctaResult instance for a given latitude and longitude. Returns null if no result is found.
  • float latDeg: Latitude of the query point (degrees)
  • float lonDeg: Longitude of the query point (degrees)
// Additional methods exist in this class; for complete documentation, please see the Full .NET Docs
}

UsZctaResult

The UsZctaResult class embodies the result of a query on a UsZctaMap instance. All of the results listed in the Returned Values Section may be accessed using an accessor whose method name consists of "Get" followed by the Key parameter from the Returned Values tables. Those tables also specify the type of the returned value. For example, here are several important accessors:

class UsZctaResult {
String GetZctaCode()
Returns the name of the ZIP Code Tabulation Area.
float GetCensusTotalPopulation()
Returns the total population in the ZIP Code Tabulation Area.
float GetCensusAgeMedianAge()
Returns the median age of the residents of the ZIP Code Tabulation Area.
// Additional methods exist in this class; for complete documentation, please see the Full .NET Docs
}
Note: these are just a few of literally hundreds of accessors listed above in the Returned Values Section.

CensusField

The CensusField class lists (as static public members) the fields taken from the 2010 US Census that are reported for each ZIP Code Tabulation Area. These may be used with the UsZctaResult to access these data if, for whatever reason, the more traditional accessors are not suitable to the application at hand. For example, some applications might result in having a list of desired fields, which could be represented as a list of CensusField members, and accessed in a for loop.

The following methods on the UsZctaResult class work with this class:

class UsZctaResult {
String GetCensusField(CensusField field)
Returns the String representation of the given 2010 US Census field, or null or an empty String if that field is missing.
  • CensusField field: The field to look up
float GetCensusFieldAsFloat(CensusField field)
Returns the float representation of the given 2010 US Census field, or float.NaN if that field is missing.
  • CensusField field: The field to look up
// Additional methods exist in this class; for complete documentation, please see the Full .NET Docs
}

Please note that if you are just trying to access a couple of fields that are known at compile time, it is probably much easier to use the direct accessors documented here.

.NET Example

The following is a complete example program demonstrating the use of the AskGeo UsZcta2010 .NET Library.

using System;
using System.IO;
using AskGeo.Flt;
using AskGeo.Base;

class UsCensus {
    static void Main(string[] args) {
        float[,] examplePoints = { { 37f, -122f }, { 42f, -89f } };
        String license = "INSERT YOUR LICENSE STRING HERE";
        String dataFilePath = @"askgeo-us-state-2010-low-1.1.0.dat";

        UsZctaLowMap map = UsZctaLowMap.Create(new FileStream(dataFilePath, FileMode.Open));
        map.Authorize(license);

        for (int i = 0; i < examplePoints.GetLength(0); i++) {
            UsZctaLowResult result = map.FindResult(examplePoints[i, 0], examplePoints[i, 1]);
            String name = result.GetZctaCode();
            float population = result.GetCensusTotalPopulation();
            float medianAge = result.GetCensusAgeMedianAge();
            float medianIncome = result.GetAcsFieldAsFloat(AcsField.AcsHouseholdIncomeMedian);
            Console.WriteLine(" Latitude: " + examplePoints[i, 0] +
                    ", Longitude: " + examplePoints[i, 1] +
                    ", Name: " + name +
                    ", Population: " + population +
                    ", Median Age: " + medianAge +
                    ", Median Income: " + medianIncome);

        }
    }
}

Please note that the ACS accessors are present on the UsZctaResult object but that they always return null or float.NaN, as we have been unable to located ACS data aggregated on a ZCTA level. If we find such data in future, we will add it to a future version of the UsZcta2010 AskGeo Java and .NET Libraries.

.NET Library Performance and Memory Consumption

AskGeo was designed from the ground up to be high performance. Our custom spatial index delivers blazing-fast response times. Furthermore, we've designed the AskGeo .NET Libraries to be thread safe and to not utilize synchronized methods or statements in the performance-critical query code. This means that computers with multiple processors or cores can take full advantage of those cores to deliver even faster performance.

The AskGeo Libraries were originally designed and written in Java and ported to .NET. Consequently, detailed performance and memory consumption information is available for the Java Libraries but not for the .NET Libraries. We have run spot checks on a few of our test cases and found that the .NET Libraries have essentially the same performance characteristics as the Java Libraries. This is unsurprising given the similarities between the languages and the virtual machines on which they run. See the Java Performance Section for detailed information on construction time, per-query time, and memory consumption.