]> granicus.if.org Git - postgis/commitdiff
changed it to make the field names in the dbf file capital letters
authorJeff Lounsbury <jeffloun@refractions.net>
Wed, 10 Sep 2003 22:40:11 +0000 (22:40 +0000)
committerJeff Lounsbury <jeffloun@refractions.net>
Wed, 10 Sep 2003 22:40:11 +0000 (22:40 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@301 b70326c6-7e19-0410-871a-916f4a2858ee

loader/pgsql2shp.c

index 8895768f34a6b529352496272ed12c22991437c8..90314d3ff26bf3bd0721ca1b3d3a506ea44c2dfd 100644 (file)
@@ -10,6 +10,9 @@
  * 
  **********************************************************************
  * $Log$
+ * Revision 1.21  2003/09/10 22:40:11  jeffloun
+ * changed it to make the field names in the dbf file capital letters
+ *
  * Revision 1.20  2003/09/10 21:36:04  jeffloun
  * fixed a bug in is_clockwise...
  *
@@ -72,6 +75,8 @@ int main(int ARGC, char **ARGV){
        int                     i,j,type,size,flds;
        int                     type_ary[256];
        int                     OID,geovalue_field;
+       int     z;
+
 
        DBFHandle       dbf;
        SHPHandle       shp;
@@ -258,6 +263,9 @@ int main(int ARGC, char **ARGV){
                        printf("field name %s is too long, must be less than 32 characters.\n",PQfname(res, i));
                        exit_nicely(conn);
                }
+               for(z=0; z < strlen(field_name); z++){
+                       field_name[z] = toupper(field_name[z]);
+               }
 
                for(j=0;j<i;j++){ //make sure the fields all have unique names, 10-digit limit on dbf names...
                        if(strncmp(field_name, PQfname(res, j),10) == 0){