Changeset 9546


Ignore:
Timestamp:
Mar 26, 2012 9:23:38 AM (4 years ago)
Author:
mcayland
Message:

Improve readability in the loader by fixing various whitespace issues.

Location:
trunk/loader
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loader/shp2pgsql-core.c

    r9324 r9546  
    797797        state->from_srid = config->shp_sr_id;
    798798        state->to_srid = config->sr_id;
     799
    799800        /* If only one has a valid SRID, use it for both. */
    800801        if (state->to_srid == SRID_UNKNOWN)
     
    809810                }
    810811        }
     812
    811813        if (state->from_srid == SRID_UNKNOWN)
    812814        {
     
    816818        /* If the geo col name is not set, use one of the defaults. */
    817819        state->geo_col = config->geo_col;
     820
    818821        if (!state->geo_col)
    819822        {
     
    13121315                {
    13131316                        char *dimschar;
    1314                         if ( state->pgdims == 4 )
     1317
     1318                        if (state->pgdims == 4)
    13151319                                dimschar = "ZM";
    13161320                        else
    13171321                                dimschar = "";
     1322
    13181323                        if (state->to_srid != SRID_UNKNOWN && state->to_srid != 4326)
    13191324                        {
     
    13241329                        stringbuffer_aprintf(sb, ",\n\"%s\" geography(%s%s,%d)", state->geo_col, state->pgtype, dimschar, 4326);
    13251330                }
    1326 
    13271331                stringbuffer_aprintf(sb, ")");
     1332
    13281333                /* Tablespace is optional. */
    13291334                if (state->config->tablespace != NULL)
     
    13451350                 *           http://archives.postgresql.org/pgsql-hackers/2011-01/msg01405.php */
    13461351                stringbuffer_aprintf(sb, "ALTER TABLE ");
     1352
    13471353                /* Schema is optional, include if present. */
    13481354                if (state->config->schema)
     
    13511357                }
    13521358                stringbuffer_aprintf(sb, "\"%s\" ADD PRIMARY KEY (gid);\n", state->config->table);
     1359
    13531360                /* Tablespace is optional for the index. */
    13541361                if (state->config->idxtablespace != NULL)
     
    13591366                                stringbuffer_aprintf(sb, "\"%s\".",state->config->schema);
    13601367                        }
     1368
    13611369                        /* WARNING: We're assuming the default "table_pkey" name for the primary
    13621370                         *          key index.  PostgreSQL may use "table_pkey1" or similar in the
  • trunk/loader/shp2pgsql-core.h

    r9324 r9546  
    191191        /* Flag for whether the geometry has Z coordinates or not. */
    192192        int has_z;
     193
    193194        /* Flag for whether the geometry has M coordinates or not. */
    194195        int has_m;
Note: See TracChangeset for help on using the changeset viewer.