How can I obtain the same area values provided by the Census for TIGER boundaries using PostGIS functions?

In PostGIS, how can I compute the area of Census Boundaries and obtain the same results as are provided by the Census? For example, most Census Boundaries include attributes for Land Area and Water Area (aland and awater, in the 2011 boundaries I'm currently using), which are in square meters. If I sum these together, should I be able to obtain the same result using the PostGIS ST_Area function, possibly after re-projecting? The Census TIGER Boundaries are provided in NAD83 / SRID 4269, which uses Degrees as the unit of measurement and as I understand is an unprojected datum. I can compute the area in SRID 4269, but the result will be in Sq Degrees, and I don't believe there is an easy way to convert to Meters as that computation would be different at differing latitudes. I have tried re-projecting to an equal-area projection - SRID 2163 / US National Atlas Equal, which uses Meters for measurement. However, while the result of the area computation is similar to what is provided by the Census, it is not identical.               SELECT          aland::BIGINT + awater::BIGINT AS source_area         ,ROUND(ST_Area(ST_Transform(the_geom,2163))) AS calc_area_2163     FROM raw.tl_2011_county_2011     WHERE statefp = '01'     AND countyfp = '005'         ;           source_area | calc_area_2163      -------------+----------------       2342683631 |     2344419979      I then considered the possibility that the discrepancy was due to the fact that I was testing on very large areas, such as Counties or States. I knew that the Census geographies were hierarchical (at least most of them), so I decided to determine if the provided Census areas values for all Block Groups in a County summed up to the values provided for the County itself. They did. However, even at the Block Group level, the results of my area computation did not match the values from the Census. ftp://ftp2.census.gov/geo/tiger/TIGER2011/BG/tl_2011_01_bg.zip               SELECT          aland::BIGINT + awater::BIGINT AS source_area         ,ROUND(ST_Area(ST_Transform(the_geom,2163))) AS calc_area_2163     FROM raw.tl_2011_bg_2011     WHERE statefp = '01'     AND countyfp = '005'         AND tractce = '950500'     AND blkgrpce = '1'     ;           source_area | calc_area_2163      -------------+----------------         53527310 |       53568242      Should I be using a different projection? Should I be using the geography data type (which would require an upgrade from the brutally old Postgres/PostGIS versions on this particular box)? Is the discrepancy due to the fact that the boundaries provided by the Census are more simplified than what they have internally?               CentOS release 5.2 (Final)     PostgreSQL 8.3.6 on x86_64-redhat-linux-gnu, compiled by GCC gcc (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42)     POSTGIS="1.3.6" GEOS="3.1.0-CAPI-1.5.0" PROJ="Rel. 4.6.0, 21 Dec 2007" USE_STATS (procs from 1.3.2 need upgrade)      * * * Update 1 In order to rule out my ancient versions of PostGIS and/or PROJ being the issue, I installed current versions of Postgres and PostGIS on a different box, loaded the same TIGER 2011 Block Groups, and ran the same calculations. New config is:               CentOS release 6.5 (Final)     PostgreSQL 9.3.2 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3), 64-bit     POSTGIS="2.1.1 r12113" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.9.2, released 2012/10/08" LIBXML="2.7.6" LIBJSON="UNKNOWN" TOPOLOGY RASTER      As I suspected, the ST_Area function returns the exact same value on this new config as on the old one.               SELECT          aland::BIGINT + awater::BIGINT AS source_area         ,ROUND(ST_Area(ST_Transform(geom,2163))) AS calc_area_2163     FROM raw.tl_2011_bg_2011     WHERE statefp = '01'     AND countyfp = '005'         AND tractce = '950500'     AND blkgrpce = '1'     ;           source_area | calc_area_2163      -------------+----------------         53527310 |       53568242      However, with a current version of PostGIS, I could also try converting to the geography data type and calculating its area. Additionally, I began to consider that the Census's area calculations were performed using the 124 State Plane Geographic Zones / Coordinate Systems for the U.S., as these would provide more accurate results. http://en.wikipedia.org/wiki/State_Plane_Coordinate_System The particular Block Group used in this example is in FIPS 01005 - Barbour County, AL. Using the interactive State Plane map at the link below, I was able to determine that Barbour County is in Southeast Alabama and that the correct State Plane is 'Alabama East'. http://avenza.com/sites/default/files/flashmaps/spsc/ Searching spatial_ref_sys for '%Alabama East%' yielded four results.               2759    PROJCS["NAD83(HARN) / Alabama East",GEOGCS["NAD83(HARN)",DATUM["NAD83_High_Accuracy_Regional_Network",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6152"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4152"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2759"],AXIS["X",EAST],AXIS["Y",NORTH]]     3465    PROJCS["NAD83(NSRS2007) / Alabama East",GEOGCS["NAD83(NSRS2007)",DATUM["NAD83_National_Spatial_Reference_System_2007",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6759"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4759"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3465"],AXIS["X",EAST],AXIS["Y",NORTH]]     26729   PROJCS["NAD27 / Alabama East",GEOGCS["NAD27",DATUM["North_American_Datum_1927",SPHEROID["Clarke 1866",6378206.4,294.9786982139006,AUTHORITY["EPSG","7008"]],AUTHORITY["EPSG","6267"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4267"]],UNIT["US survey foot",0.3048006096012192,AUTHORITY["EPSG","9003"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26729"],AXIS["X",EAST],AXIS["Y",NORTH]]     26929   PROJCS["NAD83 / Alabama East",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",30.5],PARAMETER["central_meridian",-85.83333333333333],PARAMETER["scale_factor",0.99996],PARAMETER["false_easting",200000],PARAMETER["false_northing",0],AUTHORITY["EPSG","26929"],AXIS["X",EAST],AXIS["Y",NORTH]]      I noticed that the third of these uses US Survey Feet as units, so after reading this documentation regarding Feet and US Survey Feet to Meter conversions, I added a conversion factor of 1 US Survey Foot^2 = 0.0929034116132 Meter^2 (0.3048006096012^2). http://www.wsdot.wa.gov/reference/metrics/foottometer.htm Rather than dig through the details of these projections, I decided to simply try all four to determine if any matched the Census's figures. Unfortunately, none match.               SELECT          aland::BIGINT + awater::BIGINT AS source_area         ,ROUND(ST_Area(ST_Transform(geom,2163))) AS calc_area_2163         ,ROUND(ST_Area(geom::geography)) AS calc_area_geog         ,ROUND(ST_Area(ST_Transform(geom,2759))) AS calc_area_2759         ,ROUND(ST_Area(ST_Transform(geom,3465))) AS calc_area_3465         ,ROUND(ST_Area(ST_Transform(geom,26729)) * 0.0929034116132) AS calc_area_26729         ,ROUND(ST_Area(ST_Transform(geom,26929))) AS calc_area_26929     FROM raw.tl_2011_bg_2011     WHERE statefp = '01'     AND countyfp = '005'         AND tractce = '950500'     AND blkgrpce = '1'     ;      source_area | calc_area_2163 | calc_area_geog | calc_area_2759 | calc_area_3465 | calc_area_26729 | calc_area_26929      -------------+----------------+----------------+----------------+----------------+-----------------+-----------------         53527310 |       53568242 |       53527329 |       53527861 |       53527861 |        53527014 |        53527861      Still stumped. * * * Update 2 The document below, published by the Census in 1994, outlines the history of their area calculation methodology and seems appears to indicate that area calculations for larger geographies (States, Counties, etc) are based on the sum of calculations for their component entities. http://www.census.gov/geo/reference/pdfs/GARM/Ch15GARM.pdf While I had descended from County to Block Group in the Census hierarchy, there was obviously more level to go, the Block. ftp://ftp2.census.gov/geo/tiger/TIGER2011/TABBLOCK/ Thus, to finish this line of research, I downloaded the Blocks for Alabama from the link above and loaded to my new PostGIS instance. First, I decided to verify that the source land area and water area values provided by the Census for all of the Blocks in Block Group 010059505001 actually summed up to the values provided by the Census for the Block Group itself.               SELECT          SUM(aland::BIGINT + awater::BIGINT) AS source_area     FROM raw.tl_2011_tabblock_2011     WHERE statefp = '01'     AND countyfp = '005'         AND tractce10 = '950500'     AND blockce10 LIKE '1%'     ;          source_area      -------------         53527310      This sum matches the value on the Census Block Group record itself (see previous query results above). Next, it was time to calculate the area of these Census Blocks using the same variety of projections used for the Block Group calculations - US Equal Area projection, PostGIS geography, and various Alabama East State Plane geographic zones. I assumed that some of these Census Blocks might be extremely tiny, and thus the calculations may match only due to rounding, but potentially not match for the larger Blocks, thus I ordered by the reported Area.               SELECT          name         ,aland::BIGINT + awater::BIGINT AS source_area         ,ROUND(ST_Area(ST_Transform(geom,2163))) AS calc_area_2163         ,ROUND(ST_Area(geom::geography)) AS calc_area_geog         ,ROUND(ST_Area(ST_Transform(geom,2759))) AS calc_area_2759         ,ROUND(ST_Area(ST_Transform(geom,3465))) AS calc_area_3465         ,ROUND(ST_Area(ST_Transform(geom,26729)) * 0.0929034116132) AS calc_area_26729         ,ROUND(ST_Area(ST_Transform(geom,26929))) AS calc_area_26929     FROM raw.tl_2011_tabblock_2011     WHERE statefp = '01'     AND countyfp = '005'         AND tractce10 = '950500'     AND blockce10 LIKE '1%'     ORDER BY aland::BIGINT + awater::BIGINT ASC     ;         name    | source_area | calc_area_2163 | calc_area_geog | calc_area_2759 | calc_area_3465 | calc_area_26729 | calc_area_26929      ------------+-------------+----------------+----------------+----------------+----------------+-----------------+-----------------      Block 1081 |         439 |            440 |            439 |            439 |            439 |             439 |             439      Block 1052 |         620 |            620 |            620 |            620 |            620 |             620 |             620      Block 1008 |         654 |            655 |            654 |            654 |            654 |             654 |             654      Block 1071 |         910 |            910 |            910 |            910 |            910 |             910 |             910      Block 1003 |        1342 |           1343 |           1342 |           1342 |           1342 |            1342 |            1342      Block 1038 |        1352 |           1353 |           1352 |           1352 |           1352 |            1352 |            1352     .     .     .      Block 1016 |     2010716 |        2012246 |        2010693 |        2010769 |        2010769 |         2010737 |         2010769      Block 1087 |     2138937 |        2140590 |        2138949 |        2138918 |        2138918 |         2138895 |         2138918      Block 1083 |     2200039 |        2201741 |        2200039 |        2200029 |        2200029 |         2199998 |         2200029      Block 1017 |     3016079 |        3018362 |        3016083 |        3016144 |        3016144 |         3016097 |         3016144      Block 1000 |     4598612 |        4602068 |        4598637 |        4598729 |        4598729 |         4598658 |         4598729      Block 1076 |    22454205 |       22471479 |       22454208 |       22454290 |       22454290 |        22453910 |        22454290     (109 rows)      As I expected, the ST_Area calculations for extremely small Census Blocks occasionally matched, but not for larger Blocks. The calculations were close, but not exact. I realize that some of the discrepancies are only a few hundred or thousand square meters, but that's a real discrepancy and those values add up when summing to larger and larger geographies. Still stumped. * * * Update 3 Just to flush this out further, I downloaded the 2013 TIGER Blocks instead of 2011 and performed the same calculations, in case anything had changed in the Census's calculation, projection, geodetic implementation, etc. There was no change in the Census land and water area values between 2011 and 2013, at least for this small sample set. Further, I also tried the appropriate UTM Zone projection - 17N - SRID 3724, for the heck of it.               SELECT          aland::BIGINT AS source_land_area         ,awater::BIGINT AS source_water_area         ,aland::BIGINT + awater::BIGINT AS source_area         ,ROUND(ST_Area(ST_Transform(geom,2163))) AS calc_area_2163                      -- US Equal Area         ,ROUND(ST_Area(geom::geography)) AS calc_area_geog                              -- PostGIS Geography         ,ROUND(ST_Area(ST_Transform(geom,2759))) AS calc_area_2759                      -- US State Plane - Alabama East NAD83(HARN)         ,ROUND(ST_Area(ST_Transform(geom,3465))) AS calc_area_3465                      -- US State Plane - Alabama East NAD83(NSRS2007)         ,ROUND(ST_Area(ST_Transform(geom,26729)) * 0.0929034116132) AS calc_area_26729  -- US State Plane - Alabama East NAD27 with US Survey Feet conversion facto         ,ROUND(ST_Area(ST_Transform(geom,26929))) AS calc_area_26929                    -- US State Plane - Alabama East NAD83         ,ROUND(ST_Area(ST_Transform(geom,3724))) AS calc_area_3724                      -- UTM Zone 17N     FROM raw.tl_2013_tabblock_2013 b     WHERE statefp = '01'     AND countyfp = '005'         AND tractce10 = '950500'     AND blockce10 LIKE '1%'     ORDER BY aland::BIGINT + awater::BIGINT ASC     ;      source_land_area | source_water_area | source_area | calc_area_2163 | calc_area_geog | calc_area_2759 | calc_area_3465 | calc_area_26729 | calc_area_26929 | calc_area_3724      ------------------+-------------------+-------------+----------------+----------------+----------------+----------------+-----------------+-----------------+----------------     .     .               2200039 |                 0 |     2200039 |        2201741 |        2200039 |        2200029 |        2200029 |         2199998 |         2200029 |        2207094               3016079 |                 0 |     3016079 |        3018362 |        3016083 |        3016144 |        3016144 |         3016097 |         3016144 |        3025195                     0 |           4598612 |     4598612 |        4602068 |        4598637 |        4598729 |        4598729 |         4598658 |         4598729 |        4612402              22454205 |                 0 |    22454205 |       22471479 |       22454208 |       22454290 |       22454290 |        22453910 |        22454290 |       22524848     (109 rows)      Other Notes   * this appears to confirm that TIGER boundaries provided by the Census are not generalized in any way. http://www.census.gov/geo/maps-data/data/tiger.html   * this specifies that "Area is calculated from the specific boundary recorded for each entity in the Census Bureau's geographic database", which contradicts my previous assumption that area values for larger entities were calculated by summing the areas of their component, lower-level entities. http://www.census.gov/geo/reference/gtc/gtc_area.html * * * Due to Paul's response and my inability to let this go, I created a new CentOS 6.5 VM, downloaded and installed Oracle 11g R2 Express Edition, and then used Oracle's Java Shapefile Converter to load the 2013 Census Blocks for Alabama into the database. This was somewhat painful as I haven't touched an Oracle DB in 5 years, so if anything below looks incorrect, please feel free to point it out. Below is the command I ran to use Oracle's Java Shapefile Converter to load the data into the DB. I wasn't entirely sure what to use for the tolerance parameter.               java -cp $clpath oracle.spatial.util.SampleShapefileToJGeomFeature -h localhost -p 1521 -s xe -u pete -d mypassword -t tl_2013_tabblock_2013 -f tl_2013_01_tabblock -r 4269 -g geom -o 0.000000001      The load worked like a charm. Finally the query to find the area. Included are the Block Name, the Census values for land area, water area, and total area, the calculated area using Oracle's SDO_GEOM.SDO_AREA function, the absolute value of the difference between the Census's reported value and the calculated value, again ordered by total size of the Block.               SELECT          name         ,aland         ,awater         ,CAST(aland AS NUMBER) + CAST(awater AS NUMBER) AS sourc_total_area         ,ROUND(SDO_GEOM.SDO_AREA(geom,.000000001, 'unit=SQ_M'),1) AS calc_area         ,ABS((CAST(aland AS NUMBER) + CAST(awater AS NUMBER)) - ROUND(SDO_GEOM.SDO_AREA(geom,.000000001, 'unit=SQ_M'))) AS area_diff     FROM tl_2013_tabblock_2013     WHERE statefp = '01'     AND countyfp = '005'         AND tractce10 = '950500'     AND blockce10 LIKE '1%'     ORDER BY (CAST(aland AS NUMBER) + CAST(awater AS NUMBER))     ;       NAME         ALAND     AWATER   SOURCE_TOTAL_AREA CALC_AREA  AREA_DIFF     ----------- ---------- ---------- ----------------- ---------- ---------     Block 1081         439          0               439      439.3         0     Block 1052         620          0               620      619.7         0     Block 1008         654          0               654      654           0     Block 1071         910          0               910      909.7         0     Block 1003        1342          0              1342     1341.9         0     Block 1038        1352          0              1352     1352.2         0     Block 1041        1899          0              1899     1898.7         0     .     .     .     Block 1032     1329165          0           1329165  1329165           0     Block 1085     1476381          0           1476381  1476380.2         1     Block 1036     1485921          0           1485921  1485921.2         0     Block 1042           0    1659345           1659345  1659345.4         0     Block 1016           0    2010716           2010716  2010715.9         0     Block 1087     2138937          0           2138937  2138936.7         0     Block 1083     2200039          0           2200039  2200038.6         0     Block 1017     3016079          0           3016079  3016078.5         1     Block 1000           0    4598612           4598612  4598612.1         0     Block 1076    22454205          0          22454205 22454201.3         4      The Oracle calculated values match for nearly all Blocks in this Block Group. The few that don't match differ by a single square meter, except the last Block, which differs by 4 square meters. This final Block is obviously significantly larger than any other Block in the Block Group - by 500%. I am still puzzled as to why these values don't match those supplied by the Census. I suppose that the Census may be calculating the area of smaller components of the Census Block (if such things exist) that are not published externally, and summing those values to the Census Block level. The area calculated by Oracle is 4 square meters smaller than the value reported by the Census, while PostGIS's calculation is 3 square meters larger. * * * Another update. After reading further Census TIGER documentation here: http://www.geos.ed.ac.uk/~gisteac/proceedingsonline/Oracle10%20Articles/articles/us_census.pdf (see the Features and Hierarchical Features section), it appears that all TIGER Features are comprised of topological primitives - Faces. As such, it is likely that the Area values published for Features are simply the sum of Area values for their component Faces. Thus, the tests I previously performed for Counties, Block Groups, and Blocks should really have been used on Faces. Thus, I downloaded the Faces file for Barbour County, Alabama (FIPS 01005) from: http://www2.census.gov/geo/tiger/TIGER2013/FACES/ and loaded to Oracle 11g R2 Express Edition in a table named tl_2013_faces_2013. Overall, there are 2,620 Faces in this County and we were able to reproduce the Area value published by the Census using Oracle's SDO_GEOM.SDO_AREA function for all Faces except 5.               SELECT          CASE              WHEN CAST(atotal AS INTEGER) = ROUND(SDO_GEOM.SDO_AREA(geom,.000000001, 'unit=SQ_M')) THEN 'Equal'              ELSE 'Not Equal'          END AS compare          ,COUNT(*)     FROM tl_2013_faces_2013     GROUP BY          CASE              WHEN CAST(atotal AS INTEGER) = ROUND(SDO_GEOM.SDO_AREA(geom,.000000001, 'unit=SQ_M')) THEN 'Equal'              ELSE 'Not Equal'          END     ;     COMPARE     COUNT(*)     --------- ----------     Equal       2615     Not Equal      5      Below are the details for the 5 Faces that don't match:               SELECT          tfid         ,atotal         ,ROUND(SDO_GEOM.SDO_AREA(geom,.000000001, 'unit=SQ_M')) AS calc_area_rounded         ,SDO_GEOM.SDO_AREA(geom,.000000001, 'unit=SQ_M') AS calc_area     FROM tl_2013_faces_2013     WHERE CAST(atotal AS INTEGER) != ROUND(SDO_GEOM.SDO_AREA(geom,.000000001, 'unit=SQ_M'))     ;           TFID     ATOTAL CALC_AREA_ROUNDED  CALC_AREA     ---------- ---------- ----------------- ----------      261070759   10451294          10451293 10451293.2      216313144   10274098          10274099 10274098.8      216311613   14069814          14069815 14069814.6      216311321    3436895           3436894  3436894.5      259316991   12203147          12203148 12203147.5      Anyone still reading at this point might note some seemingly strange rounding that is occurring (such as 3436894.5 rounding to 3436894). I assume this is because the calculated Area is actually something like 3436894.47 but is simply being displayed as 3436894.5 in the query output. I haven't been able to determine how to force the display of additional precision (I've tried casting a NUMERIC(15,5), NUMERIC, adding 0.000, etc). Anyway, it is still a bit unclear as to why we cannot reproduce the same Area values as published by the Census for these Faces. At this point, my assumption is this is due to the fact that either (i) we are using a different version of Oracle Spatial / Locator and associated libraries than was used by the Census when calculating these Area values, or (ii) the Census has a slightly higher degree of precision for lat/lon values in their internal database than is published in the TIGER shapefiles. Finally, I wanted to confirm that the area values published for higher level Census Features were simply the sum of the area values for their component Faces. I used Faces and Blocks for Barbour County, Alabama to confirm this. Everything matches.               SELECT          f.statefp         ,f.countyfp         ,f.tractce10         ,f.blockce10         ,CAST(b.aland AS INTEGER) + CAST(b.awater AS INTEGER) AS block_area         ,SUM(CAST(f.atotal AS INTEGER)) AS face_area_sum     FROM tl_2013_faces_2013 f     INNER JOIN tl_2013_tabblock_2013 b     ON (f.statefp = b.statefp     AND f.countyfp = b.countyfp      AND f.tractce10 = b.tractce10     AND f.blockce10 = b.blockce10)     GROUP BY          f.statefp         ,f.countyfp         ,f.tractce10         ,f.blockce10         ,CAST(b.aland AS INTEGER) + CAST(b.awater AS INTEGER)     HAVING CAST(b.aland AS INTEGER) + CAST(b.awater AS INTEGER) != SUM(CAST(f.atotal AS INTEGER))     ORDER BY          f.statefp         ,f.countyfp         ,f.tractce10         ,f.blockce10     ;          no rows selected      In addition, I received a response from the Census's Geography Division regarding this topic: Thank you for your inquiry. I spoke with our subject matter expert and here is his reply: We use Oracle's SDO_GEOM.SDO_AREA method to calculate area for each of the smallest denominator polygons (faces) in the MAF/TIGER database. To determine the land and water area values for an entity, we aggregate the areas of all the faces defining the entity. Instead of using any projection, SDO_AREA employs Girard's theorem on spherical excess angle after transforming the geodetic geometries to the authalic sphere (conversion of geodetic to authalic latitude). I hope this addresses your question, but please let us know if you have any additional questions. Thanks, Katy


Is there a way to use OSRM with PostGIS

Is there a way to use OSRM with PostGIS (Windows)? Related: Why mobile routing is so fast?


Measured Grid won't show

I'm fairly new at this, so maybe this is a simple issue. I'm trying to make a map that shows a grid of 50 meter by 50 meter boxes. I've done the Data Frame Properties for a measured grid and made sure that the coordinate systems match, but no grid appears. Any help would be much appreciated. Thanks for your time!


Segmentation Fault (segfault) when using OGR CreateField() in Python

Receiving a segfault when running this very short script in Ubuntu.               from osgeo import ogr, osr          shpfile = 'Census_County_TIGER00_IN.shp'          def cust_field(field):         '''cust_field(shpfile, field) creates a field definition, which, by calling cust_field(), can be used to create a field using the CreateField() function.         cust_field() DOES NOT create a field -- it simply creates a "model" for a field, that can then be called later. It's weird, but that's GDAL/OGR, as far as I can tell.'''         fieldDefn = ogr.FieldDefn(field, ogr.OFTInteger)         fieldDefn.SetWidth(14)         fieldDefn.SetPrecision(6)         return fieldDefn          ds = ogr.Open(shpfile, 1)     lyr = ds.GetLayerByIndex(0)     field = cust_field("Test")     lyr.CreateField(field)      Everything runs smoothly until that last line, when iPython, normal shell Python and the IDLE command line all dump to a segmentation fault. Is this an error on my end or an issue with the underlying C that I'm not addressing properly?


QGIS integration issue in windows server

I am facing problem while integrating QGIS 2.0 for web access in my VPS windows server 2008 64 bit OS. I tried all possible changes as per wiki and especially post `http://anitagraser.com/2012/04/06/qgis-server-on-windows7-step-by-step/` When i run this link `http://localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities` It gives me libfcgi.dll missing alert. I couldnt find it anywhere. Please do needful. Thanks and Kind Regards Vaibhav


Getting through the jungle of gdal2tiles.py versions and patches

After trying out different methods of greating tiles from satellite images, I have decided to use `gdal2tiles.py` which seems fastest of the ones I looked at. Then I realise that there are several versions and patches out there for `gdal2tiles.py`. Installed on my computer I have version **25611**. This version doesn't handle multiple cores and `JPEG` output (only png). Then I found this version (19288) created by a patch here which has multiple CPU support. I found this version (also 19288?) which has JPEG output. I have tried patching my default version (25611) with the Jpeg output patch found here but got "6 out of 6 hunks FAILED" and when I try the other patch for multiple cores I get "12 out of 13 hunks FAILED". Are these scripts too different from being able to be patched or am I doing something wrong? **The major question is:** could someone guide me to where I can find a `gdal2tiles.py` script which actually works with multiple cores and does JPEG output?


Python for GIS on a thumb-drive

I'm looking at putting together a light Python install on a thumb drive that I can take to client offices and do some basic GIS processing. I'm thinking of installing the following:   * PyScripter   * Python 2.6/2.7   * Numpy   * Scipy   * GDAL/OGR with the Python bindings   * GRASS, likewise with the Pythong bindings   * QGIS Does anyone have any suggestions of any libraries / software that might be a useful addition? Typically I'll be working with raster datasets, but any and all suggestions would be appreciated. (I'll cw the question if people think that its appropriate).


ArcGIS Server and Oracle SDO Geometry Interop - It Can't Be This Slow

I have an ArcGIS Map Server Map Service connecting to an Oracle 11G instance via Direct Connect. There is no need for ArcSDE since our application doesn't need versioning, replication, or any other of the doo-dads that ArcSDE provides. All we want to do is plot some dots on a map. The Oracle table(s) have a SDO Geometry column containing only point geometry types. I have implemented a spatial index, validated geometries, optimized tolerance...etc. However, the rendering performance of a layer pointing at SDO Geometry column is awful - 15-20 seconds to render 10k points with very simple symbology. I have actually found that using an event layer using raw x,y values is faster than using SDO geometry columns. I will admit that I am more knowledgeable of MS SQL and PostGIS - but I've been pretty thorough in making sure I am doing good by Oracle. I am hoping someone with more experience using Oracle SDO Geometry in their map services can provide more guidance - are there maybe a few gotcha's I'm missing. **UPDATE (Per Vince's Request):** Spatial Index SQL: `CREATE INDEX ON "SGSDWADM"."SERVICELOCATION"("GEOMETRY") INDEXTYPE IS MDSYS.SPATIAL_INDEX` USER_SDO_GEOM_METADATA row: ![enter image description here](http://i.stack.imgur.com/HF2Yk.png) Describe Output: ![enter image description here](http://i.stack.imgur.com/PARNI.png)


How can I use the Buffer Wizard in Modelbuilder or arcpy? (ArcMap 10)

I am creating a model in ArcMap 10 and I need to use the Buffer Wizard tool to create multiple buffers within a polygon feature class. The problem is, I can't seem to place the Buffer Wizard within my model. I can place the Buffer or Multiple Ring Buffer command into my model, but they don't automatically populate a FromBufferDistance or ToBufferDistance value for each ring like the Buffer Wizard does. I need these values for a field calculator equation later in the model. I may be able to get by with just using the Multiple Ring Buffer tool, but it would be much more efficient to use the Buffer Wizard. If I am unable to include the buffer wizard in my model, is there a way to run it in a script? This seems unlikely, but worth a try. Thanks


ArcObjects ITextSymbol.GetTextSize in Python: How do I define two input variables that get populated by the method?

I am using Python 2.6 and ArcObjects in ArcGIS 10.0 to build and draw, among other things, graphic text on the current display. At one point I need to use the ITextSymbol.GetTextSize method. In a function called BuildSignGraphic() have the following:               def BuildSignGraphic(pFeature, annoFC):         .         .         pTextSymbol.GetTextSize(pDisplay.hDC, pDisplay.DisplayTransformation, txt, dblX, dblY)         .         .      When I run my code I get a name error: NameError: global name 'dblX' is not defined In VB.NET, the dblX variable would be explicitly declared, but Python doesn't do this. Because the dblX and dblY variables are _input_ and get populated by the method, how do I go about defining these two variables so that Python can recognize them? This is an uncommon syntax for a method in ArcObjects, but I think it does occur elsewhere in ArcObjects. Thanks in advance for the assistance. Cheers, Ti


Is anyone indexing ArcGIS Server services on the web?

In looking at the REST API, it seems like it wouldn't be that hard to write a bot that crawls the web and indexes services (Map Services, GP Services etc.) Is anyone already doing this? **Update1:** I can find lots of mapservices with simple google search. I rather doubt google gives a very high ranking to mapservice pages though, so I'd bet there are a lot that are missed. Anyway, if someone were to crawl all these mapservice pages and assemble an index and expose that index on a site. The site could allow me to search for mapservices that are in a particular region and contain certain keywords and add the mapservices to my map. AFAIK the arcgis.com map gallery isn't built by a web crawler. **Update2** With a funcion named MapServiceHarvester, it sure sounds like Richie Carmichael might be cooking something up.


Is there a way to turn off all labels in ArcMap without clicking on every layer?

I rarely bother with labels, but sometimes it would be nice to toggle them on/off. Something like the `Pause Drawing` button, except that it would only turn off labels (all labels in all layers...not just a single layer).


ArcObjects: How to get from IFeatureClass on annotation feature class to IAnnoClass?

I am working in Python 2.6 and ArcGIS 10.0 through comtypes, so I have full ArcObjects access. (See the answer I tacked onto the related question "How do I access arcobjects from python?") That makes this strictly an object model traversal question. I have an IFeatureClass on an annotation feature class. I need to get to IAnnoClass to get the ReferenceScale property. How do I do that? I'm guessing that it starts with the Extension property inherited from IClass, but I may be way off base. Thank you, all. Cheers, Ti


Starting a GIS project in java with OSM data

I am starting a new GIS project in Java. Till now, I used JTS and geotools to load shape files - these data were then displayed on a swing interface. For this new project, I would like to use OSM data. I am wondering what is the most efficient way to start. What I am dreaming on is a simple and light open source java viewer that would be able to load and display OSM data in both vector and raster format, and that I could extend for my project. Does it exist?


What happened to the sample Portland gp services?

I'm trying to use a sample asynch gpservice. The Portland services ( http://sampleserver2.arcgisonline.com/ArcGIS/rest/services/Portland ) returns 500. It is used as a reference implementation in the online doc: http://resources.esri.com/help/9.3/arcgisserver/apis/rest/index.html?gpexecute.html Does anyone know of an asynchronous gp service I can test against? Thanks!


Vertical lines in a polygon shapefile

I am working with a GIS problem using a single input of a polygon shapefile. Consider an irregular polygon. I want to draw vertical lines across the extent of the polygon at equal spacing. How I intend to proceed is:   1. Identify the bounding box **_(done using PyShp)_**   2. Draw vertical Lines parallel to the left edge of the bounding box at equal spacing **_(How?)_**   3. Clip the lines to the extent of the polygon **_(How, without using ArcPy?)_** **Note** : They are required to be only vertical, and **not** a graticule. Also, I do not intend to use ArcPy, and intend to perform the coding completing in Python (2.7) as this segment of code needs to go into a tool generated from PyQt.


Equivalent functions in ArcMap compared to MapInfo: Objects > Combine

What is the equivalent of MapInfo's Objects > Combine in ArcMap? I have a polyline layer which is divided into 10m subsections, I want to combines these and find parts which are >50m combined. I have done this before using MapInfo by combining the disaggregating the lines (multipart to singlepart), but ideally I'd like to be able to do this in Arc, rather than ping-ponging a file between .shp and .tab format.


User locking postgres/postigs table without privileges

I have a PostgreSQL 8.4.4 database with PostGIS 1.4.2 and I am experiencing a problem where an external GIS system (using embedded CadCorp SIS 7.0) is connecting to the database and taking Access Share Locks on a large number of tables which, as far as I can understand, it should not have privileges to access. The affected tables are all sources for views that are registered in geometry_columns, across a number of schemas. All other tables, whether registered in geometry_columns or not, with or without a geometry column, are unaffected (except those explicitly required by the map project the external system is using). This is frustrating because the connections stay open for a large period of time and prevent a lot of maintenance work that I might like to do. For example I have a schema:               CREATE SCHEMA my_schema AUTHORIZATION user_one;       GRANT ALL ON SCHEMA my_schema TO user_one;        And within that a table:               CREATE TABLE my_schema.my_table...;       ALTER TABLE my_schema.my_table OWNER TO user_one;       GRANT ALL ON TABLE my_schema.my_table TO user_one;        And a view:               CREATE OR REPLACE VIEW my_schema.vw_my_view AS SELECT... FROM my_schema.my_table;       ALTER TABLE my_schema.vw_my_view OWNER TO superuser;       GRANT ALL ON TABLE my_schema.vw_my_view TO superuser;       GRANT SELECT ON TABLE my_schema.vw_my_view TO user_one;        The roles user_one and user_two are independent but I find that user_two is able to put an Access Share Lock on my_schema.my_table. If I connect to the database as user_two I am denied access to my_schema.my_table as I would expect. Is there something I'm not doing with the privileges or roles that would prevent this? Why is it only those tables that are the source for views that are registered in geometry_columns that are affected?


os.system /subprocess.call error handling when error in command line function?

In my Python script I call a GDAL utility using:               subprocess.call('gdal_rasterize -a ICE_TYPE -where \"ICE_TYPE=\'Open Water\'\" -b 1 -burn 5 -l ' + shapefileshortname +' ' +  shapefile + ' ' + outraster)      or               os.system('gdal_rasterize -a ICE_TYPE -where \"ICE_TYPE=\'Open Water\'\" -b 1 -burn 5 -l ' + shapefileshortname +' ' +  shapefile + ' ' + outraster)      Now gdal_rasterize gives an error for a corrupt shapefile, but using "try- except" on os.system only works for errors related to os.system itself. Is there within the Python script a way to handle errors by a command line function called via os.system or subprocess.call ?


How can I show "loading" while doing WMSGetFeatureInfo?

I have the following control in my page :               new OpenLayers.Control.WMSGetFeatureInfo({             url: xxxxxx,             name: 'infoControl',             queryVisible: true,             eventListeners: {                getfeatureinfo: function (e) {     .     .     .}})      I want to show a "loading" message while doing the ajax call for WMSGetFeatureInfo. How do I call my "loading" function the moment I click on the feature? the event listener in the code above happens once the data returns...


How to return absolute values using ArcMap field calculator?

I have a field of number ranging from -50 to 50. Is there a way using the ArcMap field calculator to populate a field with all of these standardised (positive numbers) so I have a range of 0 to 50 (where something that was previously -1 is now 1).


How configure pop-ups in ArcGIS Online for open there attachments?

Is it possible to open attachments by dint of pop-ups (as files jpg, doc)? According to this Help – it’s possible: “Pop-ups can be configured to show attachments as links if the map includes a features layer that has attachments in its data. You will only see an option to show attachments if the layer has them. When the pop-up is displayed, the attachment links are listed at the bottom of the window. Clicking one of the links opens the attachment in a new window” But they don’t explain how to browse theme **with attachment** to ArcGIS Online. How I can do it, if shp theme can’t have attachment, but to ArcGIS Online from ArcGIS it’s possible to browse only shp file as a zip folder.?


Performing Point Distance analysis using Basic level license of ArcGIS for Desktop?

I am using ArcView Version 10.1 and I need to perform a point distance analysis like: What is the distance from A to B-Z, B to A-Z, C to A-Z, etc? What are the steps that I take to do this?


Looking for the best data source for a geocoding database for Canada

I'm planning to build a Geocoding database for Canada. The goal is that - the database should be able to provide latitude and longitude for any given street level address in Canada. A similar implementations for USA (Geocoder::US 2.0, jGeocoder ) uses US Census Data (Tiger). Provincial Base Mapping Data Sources in Canada provides a list of data sources for Canada (both nation wide and provincial based). I couldn't find anywhere is a discussion about the **quality of these sources**. Also I don't have much time to go through all of them in detail and pick the best. If anyone had done similar research before about various geo-spatial/geo location sources of Canada for similar implementation. Or if found any similar implementations/attempts some where on web. Guide me please. Any suggestions regarding my goal are also appreciated. Note: I don't want any suggestions for services that can help like Google API, yahoo place finder etc.


Raster Version of Spatial Join (one to many)

I have two raster layers that are identical in shape (they overlap exactly) and I need to perform the raster equivalent of a Spatial Join (one to many). My files need to stay in raster format otherwise I would just do everything in vector. I'm using ArcMap 10.1. My "buffrast" raster contains the land cover value for each pixel within a circular buffer of 150m around a bunch of pointa. My "rr1" raster contains the identities for individual 150m radius circles around various points (e.g. NR0602), but has no land cover value. I need to have a final raster whose attribute table lists the land cover value for each pixel within a given 150m radius circle. That is, I need to have the circle's identity (e.g. NR0602) listed for each pixel along with its land cover value. I've already tried raster mosaic, raster calculator (combine) but I think my syntax must be incorrect. I am completely new to raster analysis so please be as explicit as possible in any advice you might have. Thanks! alyssa


Assign value to raster cells within masked area

The answer I previously received for this question did not solve my problem...please keep in mind that I am a GIS beginner, and it's quite likely that I carried out the proposed solution (using Combine tool) incorrectly. Detailed instructions on how to carry it out would be much appreciated. In ArcMap 10.1 I am trying to assign a single value (i.e. label) for raster cells within various 150m radius circles (about 1900 of them). I have one layer "rr1.tif" that contains the land cover values for each raster cell, and then I have the "buffrast" layer that contains the labels (just like the labels in this post How do I use polygons to apply a unique value to all raster cells within those polygons?). I have tried "combine" but it assigns random values instead of the specific labels. I also tried a conditional statement but again received unique values. I thought "create constant raster" would be useful too but it only does what I want for ONE value and I have 1900 different values I need to use. I posted a similar question earlier, but don't think I explained it well enough (and I don't know how to delete it).


What's the best way to store State Plane data in SQL 2008R2?

I have a client with data that is currently in a State Plane coordinate system. They are looking to store this data in SQL Server 2008R2. SQL does not "support" the SRID for the State Plane in question. I've seen some people suggesting using geometry instead of geography for storing State Plane data. I also know that I could convert the State Plane data over to WGS84 if necessary. What I'm wondering is what's the "best" way to store State Plane data in SQL 2008R2?


Address Standardizer Options

Ok, so with ArcGIS 10, ESRI has depricated 'Address Standardizing' in the new locators, I know you can still use the 9.3.1 locators to do this; but I heavily suspect that after the 10.1 version we will see this available less and less.      The FGDC Addressing Standard places a heavy value on good addresses having the Prefix, Prefix-Direction, Street-Name, Suffix, Suffic-Direction values for a good clean form. And my agency has a need for the same.      Are there other tools out there that people are using to take structured addresses and parse them out fairly-reliably so they can be stored? Are any of them free?      * * * * _Update:_ *I came across this on CodePlex (US Address Parser) and it has given me a really good jumping off point. Its really nice in that its managed code that I can use all over the place and so far it has had a very high sucess rate at breaking down parts to be reviewed line by line and part by part.


PostGIS: Assign ID of point in layer A to closest point in Layer B

This should have been an obvious precursor (that I didn't ask) to my other question: PostGIS function to create spider diagrams? If I do not know the relationship between a point in layer A (stores) and a point in layer B (customers), I would like to generally say "Customer 1 is serviced by the nearest store." While I realize this fact may not be true, it can be a decent surrogate. Using PostGIS, what is the most efficient way to assign the ID of the nearest point in layer A (stores) to each point in layer B (customers). The output I am looking for is something like below.               Customer | Store         1    |   A         2    |   A         3    |   B         4    |   C


Problem of importing signature files from stacked dataset of Landsat 8

I tried importing a signature file using the AOI file from a stacked image of 16 bands of Landsat 8 on ERDAS 9.1. Its just not happening. Error message says "statistics info not found". However a dummy signature file is eventually created, but with RGB band values as 1 (all white), but the polygon sizes (no. of pixels) are correctly formed. I cannot do supervised classification with this anyhow. Can anyone tell me how to import the .sig file correctly?


Need to enhance a function for creating quadrants within polygons

I wrote a function that creates arbitrary quadrants within a polygon               SELECT (quadrant(20,0.0,90)).*      The first parameter is the polygon ID, the second one is the start angle and with the third one the quadrant is finally spanned. First the `TYPE`               CREATE TYPE quadrant AS (id smallint,geom geometry(polygon,31468))      Here is the function               CREATE OR REPLACE FUNCTION quadrant(id integer,start double precision, stop integer) RETURNS SETOF quadrant AS $$     WITH centroid AS     (SELECT         accumulation.partnumber,         (ST_Centroid(accumulation.geom)) AS vertex     FROM accumulation         WHERE partnumber=$1     ),     newline AS     (SELECT      ST_SetSRID(ST_Translate(                     ST_Rotate(                         ST_MakeLine(                               ST_MakePoint(0.0,2000.0),                                ST_MakePoint(0.0,0.0)),                     radians(($2+s.a)*-1)),               ST_X(vertex), ST_Y(vertex)),     ST_SRID(vertex)) AS geom     FROM centroid, generate_series(0,$3,$3) AS s(a)     ),     span AS     (SELECT         centroid.partnumber,         ST_LineMerge(ST_Union(newline.geom)) AS geom     FROM newline, centroid         GROUP BY partnumber),     multiobject AS     (SELECT         span.partnumber,         ST_Split(accumulation.geom,span.geom) AS geom,         generate_series(1,100) AS n     FROM span, accumulation         WHERE accumulation.partnumber=$1),     objects AS     (SELECT         n,         ST_GeometryN(multiobject.geom,n) AS geom     FROM multiobject         WHERE n <= ST_NumGeometries(multiobject.geom))          SELECT         partnumber AS id,         objects.geom     FROM objects, multiobject         WHERE multiobject.n <= ST_NumGeometries(multiobject.geom)             ORDER BY LEAST(ST_Area(ST_GeometryN(objects.geom,multiobject.n)))                 LIMIT 1     $$ LANGUAGE 'sql';      I applied this function for 300 polygons and I noticed a problem. My last query results the smallest piece from the split. But in some cases, when the first newline (see subquery `newline`) crosses the polygon more than one time, there is a smaller piece that represents the quadrant (see the most right object in the picture below). The query doesn't calculate the right quadrant for the left object in the picture. In this case the smaller area of the split is not the quadrant, because the polygon is plumped to the northeast direction. So my question is, how I can enhance my query to avoid these incorrect quadrants. Maybe I have to overthink the function generally. ![enter image description here](http://i.stack.imgur.com/N1hKF.png)


Why does ArcMap not see *.jpeg files?

I want to georeference a *.jpeg object but I cannot even add the data to ArcMap which does not seem to see the files?


WFS request with CQL_Filter projection

I have a layer in Geoserver called bln_blocks. The layer is in `EPSG:3857`. I am doing the follwoing WFS request with a CQL Filter:                 var geoserverURL = geoserverURL + '/ows?';       var service = 'service=WFS&';       var version = 'version=1.1.0&';       var request = 'request=GetFeature&';       var typeName = 'typeName=' + layerName;       var special = "&outputFormat=text/javascript&format_options=callback:getJson";       var filter = '&CQL_FILTER=WITHIN%28geom%2C+POLYGON%28%281489248.8973085624165833+6895049.90960700158029795%2C1489248.8973085624165833+6895577.80283359717577696%2C1489945.19086309685371816+6895577.80283359717577696%2C1489945.19086309685371816+6895049.90960700158029795%2C1489248.8973085624165833+6895049.90960700158029795%29%29%29';       var urlWFS = geoserverURL + service + version + request + typeName + filter +special;      The polygon in my CQL_Filter is also in `EPSG:3857`. Is it possible that I specify my polygon in `EPSG:4326`?


How to move line segment?

I use Quantum GIS 1.8. I have a polyline layer. I can drag&drop polyline nodes by using "Node Tool". Is it possible to drag&drop line segments of a polyline in order to preserve line segments' direction?


Show content of layers in web map application

How can I show the layers used in ArcMap 10.1 such as .csv files, in published web map application? When I publish the map it says: > No layers found to display


Convert grib (grb2) precipitation band to visible PNG

I'have been trying to convert band 7 (precipitation) of a grib file (you can download it if you like) to a visible PNG image which I can load via KML into a google maps viewer I have. The precipitation of the grib displays just as I'd like to see it inside quantum gis if in Layer properties I choose to render band 7 as single band gray with a pseudocolor color map. Furthermore specifying 0 for nodata values. I have tried using this command with gdal (version 1.9.2-2~precise4):               gdal_translate -a_nodata 0 -of PNG -b 7 grib.grb2 grib.png      but the resulting grib.png 's size is just 295 Bytes and it is just transparent when opened in a viewer. I need someone to explain to me how to do this and why. And if you know other command-line tools which work to convert this file, that'll help, too.


Transforming from SRID 900913 to 4326 with PostGis

I have two Postgres tables with different SRIDs, 4326, and 900913. I want to convert the latter to 4236. I first changed the SRID using:               Select UpdateGeometrySRID('table', 'geomcolumn', 4326).        I then, transformed the reference data using:               update table set geomcolumn = ST_Transform (geomcolumn, 4326).       This seemed to work. But when I changed the SRS setting of the relevant layer in TileMill to WGS84, I get this error: > Detected out of bounds geographic extent. Presumably the transformation didn't work but it's not clear why.


world city database (with lon,lat) & population per year

I'm building a visualisation with cities population around the globe for a website, found the MaxMind free database that includes most cities around the globe with coordinates and population, which is awesome.   What I'd like to do is have something like a timeline, to show which cities have increased their population in the last years (even from 2005ish to 2012 would be great).   I looked at the Maxmind site but couldn't find any older versions of their database. Do you know a place where I can find such a database? Thanks!


Issue on Generating Points Shapefile From An Excel File with X Y Values

Using ArcGIS 10.2, I have an Excel file (Please review attached zipped Excel file) from which I am able to Generate Points by using the "Add XY Data". The points are generated on the map (using WGS84). I am then able to to export the points to Shapefile from Data --`Export Data` and then `Add` the new generated shapefile into the current document. After this the problem starts:   1. I can not Select Any Point data from graphic `Selection By Location`, Clicks on table or Selection by Attributes and ArcMap crashes after any type of Selection happens.   2. After closing the map I am not able to add the new generated point shapefile into any map! It take several minutes and finally ArcMap display this error! ![enter image description here](http://i.stack.imgur.com/L8B7o.png) Can you please help me to fix this issue! I went all through to fix it but didn't work! Download the Excel File Thanks


kmz mismatch in the Google Maps API v3 and Google Earth

I have some kmz files(exported from ArcMap). They overlay perfect with the base maps of Google Earth, but when it applied to Google Maps API, they mismatch the base maps. Can anyone give me some clues? ![Default Layout](http://i.stack.imgur.com/c1HpK.jpg) ![After Zoom In/Out](http://i.stack.imgur.com/hiPZC.jpg)


How can i read netcdf file of station data

Please can anyone have experience with netcdf data with irregular grid. my data file is taken from NCEP ADP Global Upper Air and Surface Weather Observations (PREPBUFR format) So i need to extract data in a ASCII file like this :               STATION_ID   LAT  LON     OBS_VAL ...       70585     45.5  60.5    1005.5    .....      the header information is :               [hachelaf@skynet1 test]$ ncdump -h gdas.44512.2010040100.nc     netcdf gdas.44512.2010040100 {     dimensions:             mxstr = 16 ;             hdr_arr_len = 3 ;             obs_arr_len = 5 ;             nobs = UNLIMITED ; // (98012 currently)             nhdr = 30766 ;     variables:             char obs_qty(nobs, mxstr) ;                     obs_qty:long_name = "quality flag" ;             float obs_arr(nobs, obs_arr_len) ;                     obs_arr:long_name = "array of observation values" ;                     obs_arr:_fill_value = -9999.f ;                     obs_arr:columns = "hdr_id gc lvl hgt ob" ;                     obs_arr:hdr_id_long_name = "index of matching header data" ;                     obs_arr:gc_long_name = "grib code corresponding to the observation type" ;                     obs_arr:lvl_long_name = "pressure level (hPa) or accumulation interval (sec)" ;                     obs_arr:hgt_long_name = "height in meters above sea level (msl)" ;                     obs_arr:ob_long_name = "observation value" ;             char hdr_typ(nhdr, mxstr) ;                     hdr_typ:long_name = "message type" ;             char hdr_sid(nhdr, mxstr) ;                     hdr_sid:long_name = "station identification" ;             char hdr_vld(nhdr, mxstr) ;                     hdr_vld:long_name = "valid time" ;                     hdr_vld:units = "YYYYMMDD_HHMMSS" ;             float hdr_arr(nhdr, hdr_arr_len) ;                     hdr_arr:long_name = "array of observation station header values" ;                     hdr_arr:_fill_value = -9999.f ;                     hdr_arr:columns = "lat lon elv" ;                     hdr_arr:lat_long_name = "latitude" ;                     hdr_arr:lat_units = "degrees_north" ;                     hdr_arr:lon_long_name = "longitude" ;                     hdr_arr:lon_units = "degrees_east" ;                     hdr_arr:elv_long_name = "elevation" ;                     hdr_arr:elv_units = "meters above sea level (msl)" ;          // global attributes:                     :FileOrigins = "File /glade/p/rda/transfer/dsrqst/RABAH44512/gdas.44512.2010040100.nc generated 20130912_180331 UTC on host geyser01 by the MET pb2nc tool" ;                     :MET_version = "V4.1" ;                     :MET_tool = "pb2nc"


Find nearest vector to point

Is there any better way how to find vector nearest to point then this:               select gid,ST_Distance(ST_GeomFromText('POINT($x $y)',4326),cr_2po_4pgr.the_geom)     as d from cr_2po_4pgr order by d limit 1      Sometime i have feeling that this is looking for nearest start/end point and not vector itself.


Basic raster map questions

My bigger problem is to convert a raster map to polygons. I've found some questions that give info and I'm trying to use GRASS GIS as part of that. However, I'm having some basic problems and I can't find the solution in the manual or tutorials. If someone can point me somewhere helpful that would be great. I'm using r.in.gdal to import a tiff file (following this post How to convert image of map into vector format?) of this image http://images.replacements.com/images/images5/crystal/D/dartington_chalice_clear_water_goblet_P0000019245S0003T2.jpg It imports the tiff (which I created in Gimp) as red, green and blue bands. Now I'm trying to display them and thin them and here's where the trouble comes in. When displaying... Sometimes I get the error that the raster map can't be found. Sometimes I get a red box. One time I did get the goblet, but not sure why! When I thin, I'm not sure whether to thin the 3 bands separately or whether to composite them into one map and thin that. Neither really works. As you can see I'm a newbie and I appreciate greatly any help. I've been able to do a fair job of this with WinTopo, but am trying to see if GRASS can do a better job.


Connecting PostgreSQL/PostGIS and MapGuide Maestro

This is less a specific question, but hopefully more of an open question. There is little documentation regarding connecting the excellent OS web mapping software MapGuide Maestro (http://trac.osgeo.org/mapguide/wiki/maestro) with PostgreSQL/PostGIS (http://postgis.net/). Can anyone give pointers on the connection of these two?


Changing Default Layer Switcher

![enter image description here](http://i.stack.imgur.com/rKCDd.jpg) How can I change layerswitcher properties(radio button) ? So I want to change just like drop down list ?


Clip geometries in table based upon value

I have defined a view in postgres that returns a set of polygons and can be queried as follows:-               SELECT wkb_geometry, grade_count FROM ng_schema.grade_count_report [sql.where] order by grade_count asc      This returns me a set of polygons with varying values of grade_count What I want to do next is find geometries that overlap and cut out the overlap from the geometry that has the lower grade_count. Where they were equal I would cut the geometry with the largest area. How best to do this? UDATE: To be clear when I say "has the lower grade_count" this is the lower grade count of the two intersecting geometries NOT the lower grade_count of all of them as the answer below has calculated. So I need to find ALL intersections across ALL geometries and clip them all with the LOWEST grade_count of the two losing part of its geometry.


problem of creating complex symbology line in geoserver

I have been trying to creat complex symbology lines (a line alternating dash and a exteranl SVG graphic) in geoserver using SLD, based on documentations from http://docs.geoserver.org/latest/en/user/styling/sld-cookbook/lines.html and http://docs.geoserver.org/latest/en/user/styling/sld- extensions/pointsymbols.html. But I have found that the documentation does not explain very well on those properties (stroke-dasharray and stroke-dashoffset, size..etc) that make alternating possible. For example, I have the following SLD rule can display the external graphic anchor.svg (though not very clearly and orderly):               <Rule>            <LineSymbolizer>               <Stroke>                 <CssParameter name="stroke">#000000</CssParameter>                 <CssParameter name="stroke-width">2</CssParameter>                 <CssParameter name="stroke-dasharray">5 14</CssParameter>               </Stroke>           </LineSymbolizer>           <LineSymbolizer>               <Stroke>                   <GraphicStroke>                       <Graphic>                         <ExternalGraphic>                             <OnlineResource xlink:type="simple" xlink:href="anchor.svg" />                             <Format>image/svg+xml</Format>                          </ExternalGraphic>                         <Size>8</Size>                     </Graphic>                 </GraphicStroke>                     <CssParameter name="stroke-dasharray">20 90</CssParameter>                     <CssParameter name="stroke-dashoffset">50</CssParameter>               </Stroke>           </LineSymbolizer>      but with different stroke-dasharray and dashoffset, size like the following, I can't see the external graphic ancho.svg at all:               <Rule>            <LineSymbolizer>               <Stroke>                 <CssParameter name="stroke">#000000</CssParameter>                 <CssParameter name="stroke-width">1</CssParameter>                 <CssParameter name="stroke-dasharray">10 10</CssParameter>               </Stroke>           </LineSymbolizer>           <LineSymbolizer>               <Stroke>                   <GraphicStroke>                       <Graphic>                         <ExternalGraphic>                             <OnlineResource xlink:type="simple" xlink:href="anchor.svg" />                             <Format>image/svg+xml</Format>                          </ExternalGraphic>                         <Size>8</Size>                     </Graphic>                 </GraphicStroke>                     <CssParameter name="stroke-dasharray">5 15</CssParameter>                     <CssParameter name="stroke-dashoffset">7.5</CssParameter>               </Stroke>           </LineSymbolizer>      can anyone give me a clearer explaination of these stroke-dasharray, stroke- dashoffset properties and their displaying effect togather with the size of external graphic?


ArcPy performance issues with an UpdateCursor when sorting

I'm hoping that someone will be able to help me here. I have written a short ArcGIS Python script (mainly cobbled together from other examples) that sorts a feature class ascending based on two fields (route, and sequence). A third field is then populated with an ascending number. An If block restarts the numbering for each route. The problem is performance. The process is very slow when running on my test data (~8000 records). I plan on running this on 100000 records, so any help or suggestions to improve speed will be appreciated. Thanks. James               import arcpy,os     from arcpy import env          inTable = arcpy.GetParameterAsText(0)      #  Input feature class          #  set variables for route and sequence starting values     route_previous = ""     route_current = ""     new_sequence = 1          #  create an update cursor that will append ascending order sequence number to the Service_Type field     #  sorts ascending by Route and Sequence     rows = arcpy.UpdateCursor(inTable,'','','','Route A;Sequence A')          for row in rows:         route_current = row.Route     #  if the current service location is on the same route as the previous         if route_current == route_previous:             row.setValue("Service_Type",new_sequence)             new_sequence += 1             rows.updateRow(row)     #  if the current service location is on a different route to the previous         else:             new_sequence = 1             row.setValue("Service_Type",new_sequence)             new_sequence += 1             route_previous = row.Route             rows.updateRow(row)          #  delete the update cursor     del rows


Buffering with physical barrier using ArcGIS for Desktop?

I don't think it is possible, but I'm looking for a way to stop my buffer at a certain physical barrier. For example, I have point near a river and I'm creating a buffer around my point that is larger than the river-point distance. So, I'm buffering on the other side of the river. I can erase my buffer polygon with my river polygon and then erase what's on the other side, but I have ~50 sites, with a couple thousands points total so that's a lot of cleaning... Any ideas?


Upgrade Leaflet to 0.4, how to start?

I have an app based on leaflet 0.3.1 and it is time to upgrade to 0.4 !!! Nice ! So, what to do now ! Obviously, our map is absent in the browser, so let's have a look inside our files. Well, i have changed the scripts url in html to their new path...no more append on the screen...Héhéhé, of course is not so simple :D Right, so now, let's start by the map and one of those layers... I have seen the document of reference : https://github.com/CloudMade/Leaflet/blob/master/CHANGELOG.md#other-breaking- api-changes but i don't know how to start, is that to remove all the _new_ ? thanks if you can help from that point ! Edit: After one hour, i get my geojson back ! but with a bit of pain ! let's continue if it's all ! one good sign is that i have no error in CSS also :P


Making county-level shapefile from set of points at 30 x30 km spacing using ArcGIS for Desktop?

I have a data set in csv form, like:               latitude, longitude, value     -45, 45, 10     ....      I would like to calculate county level means from these data, using either ArcGIS or R+grass. I have the ArcGIS USA Counties layer, but I have not been able to successfully complete a spatial join. How can I do this?


Comparing two shapefiles based on ID and spatial

I have two shapefiles that contain position information for individuals, one is their reported location (line segments) and the other is their high- frequency recorded location (point data); they have an ID field that is common between them. What I am looking to do is identify the _reported_ locations in the larger recorded data set with a spatial selection. The problem is my data is so condensed that I cannot do a simple select by location. There is too much overlap of individual locations. I also have over 1,000 individual IDs so I don't want to individually query each ID. What I am looking for is a way to use possibly a cursor to go through each unique ID, query only the records in each table that share that ID, then do the spatial selection. I am very new to cursors and scripting in general so I don't know if a cursor can be used for two tables. _(This may be irrelevant but for this process I can convert my line data to point data if having the same type of shapefiles is important.)_ **_(Removed previous code that I am no longer using)_** I am also unaware if maybe Make Query Table will work for this (I have never used it).   Thanks! **UPDATE:** Here is a new code that I worked on with a fellow GIS person. GOOD NEWS! After leaving ArcGIS alone for a while, my code ran! It went as expected, but only did one iteration on one ID. The iteration should be implied in the Cursor as far as I know, or is there a line of code I'm missing that tells the Cursor to repeat for all IDs?               rows = arcpy.SearchCursor("hmb_logbook_2009")     for row in rows:         whereClause = '"trip_id" = ' + str(row.trip_id)         arcpy.MakeFeatureLayer_management("hmb_logbook_2009", "currentLines", whereClause)         arcpy.SelectLayerByLocation_management("hmb2009", "WITHIN_A_DISTANCE", "currentLines", "1 Miles", "NEW_SELECTION")         arcpy.SelectLayerByAttribute_management("hmb2009", "SUBSET_SELECTION", ' "trip_id" = ' + str(row.trip_id))         arcpy.CalculateField_management("hmb2009", "match_activity", 1)         arcpy.SelectLayerByAttribute_management("hmb2009", "CLEAR_SELECTION")         arcpy.Delete_management("currentLines")     del row, rows       **UPDATE 2:** So I have troubleshooted, and the reason the code only ran once is this error associated with my Make Feature Layer tool. Here is the error message: **ERROR 000622: Failed to execute (Make Feature Layer). Parameters are not valid. ERROR 000628: Cannot set input into parameter in_features.**   I tried putting the full address into that tool (only that one) instead of referencing the layer in the map and it works!   Thanks so much everyone!


GeoDjango with MongoDB

Has anyone had experience successfully deploying GeoDjango with MongoDB? Is it possible? If so, how is it as simple as as installing the non-relational fork of Django and setting MongoDB as the backend? I like the scaling capabilities of MongoDB and the ability to make schema changes without having to migrate my apps, but have had difficulty finding documentation on setting GeoDjango with non-relational backends. My geospatial queries largely consist of checking for intersections and containment of geometries.


Apply style to second field

I created a point shapefile in QGIS 2.01. Then, I changed the style of the points so they display the contents of the _Acceleration_ field in the attribute table. Works exactly as I require. Now I would like to apply the same style to a second field in the table, but when I select that field in the _Style_ dialog box, all the symbols are reset to their original display characteristics (colour, size). Is there a way to retain the current style definitions, and simply apply them to a second field? The value ranges are identical for both fields, so the same symbology could apply. I tried to save the style using the _Save Style_ button. Tried both options (*.qml and *.sld), but neither of them created a file. The *.sld option generated an error message that I should check the folder permissions, but that does not make sense because I've been using that folder to store the shapefiles.


Can Polygons be generalized to MultiPolygons in GeoDjango?

I set up a model with `models.PolygonField` in geodjango, using postgres as database. I try to import shp into postgres. The problem is, shp (compiled with QGIS) mixes polygon and multipolygon, hence it always fails to do the export because of the constraint check `enforce_geotype`. So is there a way to clear the constraint, so as to store both multipolygon and polygon type data?


How to connect Microstation V8i to Postgresql?

I have been searching the web trying to find out if any one has connect Microstation to Postgresql, and to my surprise there has not been alot of chatter on ways to do this.. When looking at the database connection window in V8i I see no postgresql connection. Does anyone know a way to make this connection?


Geoserver: How do Coverage Stores work?

I'm working on a project at work to download imagery from else where and add it to geoserver. I have no experience in GIS, nonetheless geoserver. I've been hunting through the REST api for 2.0.X of Geoserver and can create workspaces and empty coverage stores. I get that coverage stores hold raster graphics, but is it one-to-one or do they share a special relation by being in the same store? What's the URL and method (PUT, POST, etc) to add a tiff to a coverage store?


Can adding entropy to a copyrighted spatial data make it a new dataset?

I have a dataset of building polygons that is copyrighted. Say I applied some random noise to every point in each polygon, is there a theoretical measure at which the initial dataset is no longer identifiable, and the dataset becomes a completely different dataset? I'm not certain that the dataset would still be useful at this point, but I'm curious if there is a legal or ethical argument justifying this approach. The data is originally from the Ordinance Survey of Ireland with the following statement "The actual polygons are extracted from OS Maps which are under licence".


Measuring scale for small scale maps

A cartography question: you open an atlas and usually at the beginning of it there are some world maps showing various thematics. Let's say the world map uses Robinson projection and it says it has a scale of 1 : 120,000,000. How is this scale determined? Are there any standard practices (measuring scale ratio of 10° longitude on equator or something similar)? Or is this an imprecise science left to each cartographer to figure out?


Java or .net for gis application

I currently use python for GIS scripting in arcgis and image processing using GDAL library. Now, I want to improve my programming skills for GIS application development both for desktop as well as internet applications using either Java or .net. I am a bit confused at this moment which will be better for learning as well as better scope for industry jobs. Your suggestion will be highly appreciated. Cheers, Rodney


Is there a way to edit the host name of Postgis layer?

Recently I change my server to a remote host. That's means all my work there I used Postgis layers, the host name at the source is set to 'localhost' and I need to change to 'remotehostname'. The content of the source appears with the complete connection, host, dbase, login and password and the query with, at the field "source layer" at general tab in the layer properties. I can select copy and paste, but this field can't be edited. There is a way to edit this source?


Create a point at the highest value in a raster ArcGIS 10.1

I am trying to find the location of the highest value pixel in my Direct Solar Radiation Raster. I can see the extent of the data in my raster but don't know where the highest value pertains to. Is there a way to simply select pixel with highest value or create a point at highest value? Much appreciated!


How works Openlayers GetFeature Filter strategy

I want to select on map that **"res_id = 182"** but that is selecting all objects on the map.               var filter = new OpenLayers.Filter.Comparison({         type: OpenLayers.Filter.Comparison.EQUAL_TO,         property: "res_id",         value: "182"     });          var  filterStrategy = new OpenLayers.Strategy.Filter({filter: filter});          var control = new OpenLayers.Control.GetFeature({         protocol: OpenLayers.Protocol.WFS.fromWMSLayer(mylayer),         strategies: [new OpenLayers.Strategy.Fixed(),filterStrategy],         box: true,         multipleKey: "shiftKey",         toggleKey: "ctrlKey"     });      I actually want to select an area on map and filter selected items by attribute from combobox.


How can I transfer annotations from ArcMap to MAPublisher?

I'm collaborating with a designer who's using Avenza MAPublisher, while I'm using ArcMap Basic. We're still figuring out where the handover between GIS and Illustrator will be. Can I create labels or annotations using ArcMap and Maplex, and pass these to the designer to refine in Illustrator? The designer will need access to the individual letters and words in the annotations, in order to adjust each letter's size, placement, etc. I've tried exporting in *.AI format, and saving the labels as annotations in a file geodatabase. But the designer isn't able to import either of these into MAPublisher/Illustrator. In the case of the AI file, the layer has lost its georeferencing and needs to be placed manually, which isn't suitable for this high-precision work. The "add data" function in MAPublisher simply doesn't see the annotation featureclass in a file geodatabase. Does the designer need to generate the labels himself using the Label Pro extension to MAPublisher?


Obtaining feature using ArcGIS for Server and WFS based on featureid?

This has baffled me for hours, I've tried nearly every combination of request parameters without success. I have a points coverage published in arcgis and can download the feature GML via WFS for the entire layer using the following request (sorry the server is not available on the internet): http://mymachine.com/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.1&REQUEST=GetFeature&typeName=iwiswells Which returns XML for each feature member in the layer like so:               <wfs:FeatureCollection xsi:schemaLocation="http://server/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer http://server/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer?request=DescribeFeatureType%26version=1.1.0%26typename=iwiswells http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">         <gml:boundedBy>             <gml:Envelope srsName="urn:ogc:def:crs:EPSG:6.9:4326">                 <gml:lowerCorner>28.522 -10.5</gml:lowerCorner>                 <gml:upperCorner>80.469 65.01144</gml:upperCorner>             </gml:Envelope>         </gml:boundedBy>         <gml:featureMember>             <DMS_DMS_WELLS:iwiswells>                 <DMS_DMS_WELLS:FID>0</DMS_DMS_WELLS:FID>                 <DMS_DMS_WELLS:Shape>                     <gml:Point>                         <gml:pos>64.994 7.5312</gml:pos>                     </gml:Point>                 </DMS_DMS_WELLS:Shape>                 <DMS_DMS_WELLS:gid>1</DMS_DMS_WELLS:gid>                 <DMS_DMS_WELLS:sitelocid>101</DMS_DMS_WELLS:sitelocid>                 <DMS_DMS_WELLS:site_ref>101/1</DMS_DMS_WELLS:site_ref>                 <DMS_DMS_WELLS:latitude>24.9943</DMS_DMS_WELLS:latitude>                 <DMS_DMS_WELLS:longitude>47.5002</DMS_DMS_WELLS:longitude>             </DMS_DMS_WELLS:iwiswells>         </gml:featureMember>         <gml:featureMember>             ...         </gml:featureMember>     </wfs:FeatureCollection>      In geoserver to select the single feature with a feature id of 10 I would use the following WFS request: http://mymachine.com/geoserver/iwis/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=iwis:points&featureid=10 And this results in on feature member begin returned. What I'm looking for is an arcgis WFS equivalent! I have read all the documentation, all the specs but my request either result in the entire feature list being returned or an error message, here's a few requests I have tried: http://mymachine.com/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.1&REQUEST=GetFeature&featureid=10 http://mymachine.com/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.1&REQUEST=GetFeature&typeName=iwiswells&CQL_FILTER=FID='10' I've even tried using a filter on a different attribute without success: http://mymachine.com/arcgis/services/DMS/DMS_WELLS/MapServer/WFSServer?SERVICE=WFS&VERSION=1.1.1&REQUEST=GetFeature&typeName=iwiswells&filter=<Filter><PropertyIsEqualTo><PropertyName>site_ref</PropertyName><Literal>10</Literal></PropertyIsEqualTo></Filter>


Changing ArcGIS Server 10.1 port (6080 to 8080)

Due some network issue (Maps are not displaying in secure environment), I want to change the default port 6080 to 8080. I am going through Web help and few links in which they mentioned that install ArcGIS web adopter but I do not think that it is recommend for Amazon instance. We have our ArcGIS Server 10.1 on Amazon instance (windows environment) and I am using the REST link in my Java script applications & sometimes the ArcGIS Port 6080 is blocked due to network permissions and hence my maps are not visible that’s why I need 8080 port Here are the links I am going through… Ports used by ArcGIS Server http://resources.arcgis.com/en/help/main/10.1/index.html#/Ports_used_by_ArcGIS_Server/015400000537000000/ Deployment scenarios http://resources.arcgis.com/en/help/main/10.1/index.html#//015400000488000000 Amazon configuration for ArcGIS Server 10.1 http://hackgeo.com/arcgis/arcgis- server/arcgis-server-10-1/arcgis-server-10-1-on-ec2-single-server-initial- setup So any workarounds/suggestions will be great : ) Thank you in advance!!


Problem adding dates into an existing feature class from an excel spreadsheet

I've been trying to load data from an excel spreadsheet into existing feature classes, but I've been having some trouble with the dates. I've written a script that compares the values in the spreadsheet & in the feature class.               arcpy.MakeFeatureLayer_management(engPath, 'engPath')       arcpy.SelectLayerByAttribute_management('engPath', "NEW_SELECTION", d)     EngCursor = arcpy.da.SearchCursor('engPath', '*')     for row in EngCursor:         for item in Master_Dict.itervalues():             print item[1], row[3]             if item[1] == row[3]:                 i = 0                 j = 2                 while i < 34:                     if item[i] == row[j]:                         print "Values are the same"                     else:                         print "NOPE!", item[i], row[j]                     i+=1                     j+=1      When I run the script, I get values like this: Excel Spreadsheet Value = "41526.0" Feature Class Value = "2013-09-09 00:00:00" Those two values are supposed to be identical, and the excel value for the cell does show "09/09/2013". I've checked the spreadsheet, and the column is set to a date data type. I don't know how to tell arc that it is indeed looking at a date data type.


Geocoder widget find() method does nothing

According to https://developers.arcgis.com/javascript/jsapi/geocoder- amd.html#find the geocoder widget has a method "find" which seems to be a manual way of forcing the widget to start the geocode. I put this method into one of the esri samples but it never actually does anything. Here is a JSFiddle of the Esri sample code plus the line `geocoder.find()` My intent here is that I want to be able to have an address be automatically located to when the user loads the map.


Put the author's name on maps?

I've been informed by my employer of a new policy where I am not to put my name on maps. I've always put my name on my maps in the past and have never run across this policy. Is it uncommon in the industry to add the map author's name to maps?


Which wavelengths are assigned to which bands in NAIP imagery?

I cannot seem to find a definitive source on which wavelengths are assigned to which bands for 4-band NAIP imagery. Here is an example of the imagery I am working with (2011 4-band NAIP imagery). I contacted the USDA FSA APFO Aerial Photography Field Office who then sent me a metadata file. The only pertinent information in the metadata is as follows: > >                     Each sensor collected 11 image bands. >   >                     PanF27A,PanF02A and PanB14A panchromatic bands with a >   >                     spectral range of 465-676nm. RedN00a and RedB16a with a >   >                     spectral range of 604-664nm. GrnN00a and GrnB16a with a >   >                     spectral range of 533-587nm. BluN00a and BluB16a with a >   >                     spectral range of 420-492nm and Near-infrared bands >   >                     NirN00a and NirB16a with a spectral range of 833-920nm. >   >                     The CCD arrays have a pixel size of 6.5 microns in a >   >                     12000x1 format. >   When analyzing the pixel brightness values for water, band 1 appears to be red due to lower pixel brightness values and band 3 appears to be blue due to high pixel brightness values and band 4 is definitely nIR due to very low pixel brightness values. **Is there a definitive source to support or reject my assumptions on which bands are which?** * * * ![enter image description here](http://i.stack.imgur.com/H7fq7.jpg)


OpenLayers Projection and Datum Question

I had a conversation with a co worker that was asking about an OL map I am developing. She asked me what the 'projection' was and I said EPSG:4326. She didn't know what that means, so I said it's based on WGS84, to which she replied: that is a mercator, what is the projection? Can someone clear this up for me please?


Find if a table is mappable/contains an Obj column

How do I check whether a table is mappable? I am trying to select all records from a table that contain objects, like this:               Select * From TableName Where Obj Into TempTable      If a table doesn't have an Obj column then this will cause an error. How can I check for the existance of the Obj column?


Postgis how to add a vertex to a linestring at intersection with a point?

I'm using postgis 2.0 and I want to add a vertex to a linestring (pipes) at intersection position with a point (startpoint of waterlateral). Can anyone help?


Icons of different layers cover each other

I have converted 6 KML files (including a set of points) into 6 layers by ArcMap 10. For points in each layer, I have considered a special icon with a specific color. I also decreased the size of icons as much as possible. But the icons of different layers cover each other and the picture is not desirable enough to be inserted in an article. Is there any way to convert the icons into transparent ones? Do you have any idea to solve this problem? I really appreciate your help


How to add Direction and Distance to attribute table?

anyone who can help. i just want to add direction (Bearing: i.e N 25 35 E) and Distance (Length: 125 meters) as my new field in polyline/line data. is there a plug-in to generate these fields? i tried to used "export/add geometry columns" in my line data, but only "Length" value was added. Thanks


HSLayers WPS GUI problem

I have a GeoServer running, I have made a process that simply returns the requested tiff. Now here's the deal : when I send my request from the integrated WPS demo in GeoServer, the GUI gives me a list of available maps to choose from. However, when I try the same thing with my (working) HSLayers client (a simple HTML page with an embedded js WPS client), the GUI asks me for an URL and I have no list of maps. I would prefer having them shown. Additionnaly, if I take any random process, the GUI will work fine. If I switch between processes, everything works fine (updating input fields, etc.). But once I switch to my AddGeoTIFF process, the GUI generator bugs and doesn't switch anymore (I have to reload the page). Is this due to a small error in the HSLayers client or is it a problem in the prototyping of my process ? Here's my process' code :               @DescribeProcess(title = "AddGeoTIFF", description = "Returns a GeoTIFF\n")     public class AddGeoTIFF implements GSProcess {          private static final CoverageProcessor PROCESSOR = CoverageProcessor.getInstance();          @DescribeResult(name = "result", description = "The resulting GeoTIFF")     public GridCoverage2D execute(             @DescribeParameter(name = "coverage", description = "The GeoTIFF you wish to obtain") GridCoverage2D coverageA,             ProgressListener progressListener) throws ProcessException {                 return (GridCoverage2D) coverageA;         }     }      I am not good with Java and based it on an existing process, so there might be some horrors. I have been looking for the cause of the issue, and it is (what I believe to be) a parsing error. The (on the fly) GUI generator's part which troubles me can be found in `[HSLayers install file]\source\HSLayers\WPSClient\complexField.js`, on lines 77 to 82. If someone experienced could have a look at it, It'd help. Thanks


GeoNetwork map viewer not displaying title name in Thai language?

I am using **GeoNetwork 2.10.3** to **Add WMS** server from **GeoServer** and am unable to display its title using the **Thai** language. I have tested an edit string with the Thai language and it worked. It is only the map viewer which cannot display it. Can you help me to fix this problem? ![enter image description here](http://i.stack.imgur.com/voy8g.png)


What is a good method for serving many static map layers through ArcGIS Server 10?

I'm writing a Silverlight app that consumes some map services from ArcGIS Server 10.0 SP2 and I have about 15 layers of historical imagery I would like to give the user access to. This imagery doesn't change and I'd prefer to use a cached map service so the user gets a smooth panning/loading experience. The catch is the user needs to be able to have any two layers overlaid on each other so they can blend between the two. I can see two options to do this:   * Create 15 cached map services, one for each layer   * Create one multi-layer cached map service I've read several threads where it has been stated that multi-layer caches are not for web applications (and it appears they use the DynamicMapService from the API so they may not even satisfy all my requirements). I'm sure this isn't an unusual situation to be in and I'm wondering what the typical solution might be. Right now the layers are dynamic layers and it doesn't provide as smooth a user experience as I'd like.


What is ArcGIS Market place?

Does any one know (OR using OR have experience) exactly what is ArcGIS Market place? According to Google search its related with selling apps and GIS data built using ESRI software's. So any additional information/help will be great !! thanks in advance !!


How to enforce labels for all polygons?

I am trying to label polygons but it does not always work. Either the polygon is quite large, then the label appears, or the polygon is small, then the label is not displayed. I've already tried to lower label size, disable box about overlap labels, disable scale limits, yet, nothing works. If I want the label being displayed, I have to use the node tool in order to make the polygon larger ... this is not the good solution. Has someone already met this problem? (I have looked in other questions, but only polygons geometry validity is mentioned, and I have already checked it)


Equivalent function to shapely's envelope in ogr?

I wrote a very simple python function that gives me the envelope/bounding box/...based on two coordinate pairs (ower left and upper right corner):               # ...     def get_bounding_box(self, ll_corner, ur_corner):         try:             from shapely.geometry import MultiPoint             mp_env = MultiPoint([ll_corner, ur_corner]).envelope             return ogr.CreateGeometryFromWkt( mp_env.to_wkt() )          print mp_env     POLYGON ((4.8439699999999997 52.3661099999999990, 4.8469199999999999 52.3661099999999990, 4.8469199999999999 52.3706000000000031, 4.8439699999999997 52.3706000000000031, 4.8439699999999997 52.3661099999999990))      As you can see I'm returning an ogr geometry which I use, for instance, in this manner:               bbox = geo.get_bounding_box(lowerleft,upper_right)      ...     p=ogr.Geometry(ogr.wkbPoint)     p.AddPoint(x,y)     if p.Within(bbox):         ....      Isn't there an equivalent function to shapely's envelope in ogr? Both `.ConvexHull()` and `GetEnvelope()` return only the two corner coordinate pairs.


GRASS 6.4.2 define Geographic boundaries using MSYS

I am working with daily gridded rainfall data of 50 years. The initial data had the extension .nc.gz.tar which I have unzipped using MSYS in GRASS 6.4.2. Now I have 365*50 days of daily data. My problem is that my data covers a large region of which I am only interested in a small region. I have the co-ordinates of my region of interest xx°, yy° N, xx°,yy°E. I want to write a shell script which could extract only this region from each daily file and give me the output. Is there any way I can do this for all the 365*50 days. I would really appreciate any help.                     tar -xvf APHRO_MA_050deg_V1101.1951-2007.nc.gz.tar                  i=1951             while [ $i != 2008]     do        gunzip APHRO_MA_050deg_V1101.$i.nc.gz         r.in.gdal -o input=NETCDF:"APHRO_MA_050deg_V1101.$i.nc":precip output=prec$i         rm APHRO_MA_050deg_V1101.$i.nc     done      Thanks a lot


Access Shapefiles from PostgreSQL/Postgis in R

I successfully setup a connection to my PostgreSQL/PostGIS database on Ubuntu Server from my Laptop (Ubuntu 12.04). Therefore I installed RODBC in R to setup a connection and I made a correct entry in the /etc/odbc.ini file to setup the DSN as described for example here. Now I'm able to connect to my database with               ch<-odbcConnect("database")      After connecting, I'm am able query all the tables inside the database with SQL queries and even use the spatial functionalities of PostGIS inside the db. Now I would like to work with the spatial data inside R so I downloaded the RGDAL package. The driver for PostGIS should be automatically included in Unixbased systems so I execute               ogrDrivers()      to check this. It gives me back that PostgreSQL = TRUE so I assume this includes the PostGIS driver?! Otherwise it isn't listed. Now, in theory I should be able to read-in a layer like this:               test<-readOGR(ch,"state")      but unfortunately I gives back:               Error in ogrInfo(dsn = dsn, layer = layer, encoding = encoding, use_iconv = use_iconv) : Cannot open file      So did I miss anything? What can I do to make it work?


How do you create a CartoDB viz with a dynamic SQL statement?

I want to create a CartoDB viz where the where parameter in my SQL statement changes dynamically at runtime. When I share my CartoDB viz from the dashboard, I can't help but notice the the SQL statement is passed as a URL var. I thought that was an easy way to dynamically change the where clause. After playing around though, I found out that the parameter is ignored (and for good reason, to guard against SQL injection), though other parms like showing the title/desc and the ne/sw latlongs are processed. So I'm now trying to create a viz using the CartoDB API. But for some reason, I can't get the creating visualizations at runtime example to work.


Installing Geoserver on Ubuntu 13.04 - " trying to overwrite '/usr/bin/shp2pgsql-gui' "

I am trying to upgrade Opengeo Suite from 2.0 to 4.0, specifically for the upgrade of PostGis 2.0 to 2.1, I followed the instructions outlined on this page: http://suite.opengeo.org/opengeo-docs/installation/ubuntu/upgrade.html But had no success. I realized I hadn't fully installed opengeo-client or postgis 2.1, so I used apt-get install and received this:               The following packages have unmet dependencies:     opengeo-client : Depends: postgis-2.1 (>= 2.1.0) but it is not installed     postgresql-9.3-postgis-2.1 : Depends: postgis-2.1 but it is not installed     E: Unmet dependencies. Try using -f.      So I used -f and received..               The following extra packages will be installed:       postgis-2.1     The following NEW packages will be installed:       postgis-2.1     0 upgraded, 1 newly installed, 0 to remove and 3 not upgraded.     28 not fully installed or removed.     Need to get 0 B/701 kB of archives.     After this operation, 1,839 kB of additional disk space will be used.     Do you want to continue [Y/n]? Y     dpkg: warning: files list file for package 'postgresql-9.2-postgis2' missing; assuming                     package has no files currently installed     (Reading database ... 384786 files and directories currently installed.)     Unpacking postgis-2.1 (from .../postgis-2.1_2.1.0-1+opengeo_amd64.deb) ...     dpkg: error processing /var/cache/apt/archives/postgis-2.1_2.1.0-1+opengeo_amd64.deb (--unpack):      trying to overwrite '/usr/bin/shp2pgsql-gui', which is also in package postgis 1.5.3-2ubuntu1     dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)     Errors were encountered while processing:      /var/cache/apt/archives/postgis-2.1_2.1.0-1+opengeo_amd64.deb     E: Sub-process /usr/bin/dpkg returned an error code (1)      I was recommended to go back and forth with **apt-get upgrade** and **apt-get -f install** to isolate the issue. But I am assuming that Postgis 1.5 is still in use, but I cannot find where to remove it. (If it is possible to do a complete wipe of the Opengeo suite then I can also do that if it would be simpler, all of my data is backed up) Please be as specific as possible in what to do, I'm not experienced in Linux. Most of my work is on the GIS/Web side. My Ubuntu release is: Ubuntu 13.04 Raring Let me know if I need to provide any more information (and how to provide it) and I'll be as hasteful as possible. Thank you.


QGIS 2.0.1: Changing layer properties with python console

I'm working on a plugin that will aim to ensure that the following steps either "transparent" to the user with one click :   1. Creating a table with predefined fields   2. Record in this table in postgis, then open in Qgis   3. Changing the properties (especially the properties of the fields tab) this layer to:                - Set "Edit widget" of fields       - Associate a form created with Qt Creator       For steps 1 and 2 is OK. However despite researches in the qgis' Cookbook and forums, I haven't find functions that allow me to carry out step 3 using the python console ... Have you any idea ? Thanks for the answers in advance! Guillaume


How to split a raster into multiple rasters using QGIS?

I would like to know how to split a raster into multiple rasters in a single operation using QGIS. Although I can clip the raster image, it would be better to split it using a single operation. I am using QGIS version 1.8.0.


How to build topology without an ArcEditor or ArcInfo license?

I have a huge dataset that I am capturing that was full of errors previously and I want to make sure that the new version is error free - which can be very time consuming with only an ArcView standard license. Therefore, I was wondering if anybody knew of any free/low cost (<£200/$350) alternatives that can be used to build topology without having to shell out for ArEditor? Many thanks Mark