From dc99335b5c75d4c2efb779c47a3b2419b135ec6b Mon Sep 17 00:00:00 2001 From: Jeff Lounsbury Date: Fri, 11 Oct 2002 20:22:57 +0000 Subject: [PATCH] fixed the errors in the error fix i had just committed... git-svn-id: http://svn.osgeo.org/postgis/trunk@195 b70326c6-7e19-0410-871a-916f4a2858ee --- loader/pgsql2shp.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/loader/pgsql2shp.c b/loader/pgsql2shp.c index 3b16d38cf..bb6599f43 100644 --- a/loader/pgsql2shp.c +++ b/loader/pgsql2shp.c @@ -904,13 +904,13 @@ int create_multilines(char *str,int shape_id, SHPHandle shp,int dims){ obj = (SHPObject *)malloc(sizeof(SHPObject)); if(dims == 0){ - if(notnull ==1){ + if(notnull > 0){ obj = SHPCreateObject(SHPT_ARC,shape_id,lines,part_index,NULL,max_points,totx,toty,totz,NULL); }else{ obj = SHPCreateObject(SHPT_NULL,shape_id,lines,part_index,NULL,max_points,totx,toty,totz,NULL); } }else{ - if(notnull ==1){ + if(notnull > 0){ obj = SHPCreateObject(SHPT_ARCZ,shape_id,lines,part_index,NULL,max_points,totx,toty,totz,NULL); }else{ obj = SHPCreateObject(SHPT_NULL,shape_id,lines,part_index,NULL,max_points,totx,toty,totz,NULL); @@ -955,13 +955,13 @@ int create_lines(char *str,int shape_id, SHPHandle shp,int dims){ obj = (SHPObject *)malloc(sizeof(SHPObject)); if(dims == 0){ - if(notnull ==1){ + if(notnull > 0){ obj = SHPCreateObject(SHPT_ARC,shape_id,1,part_index,NULL,points,x,y,z,NULL); }else{ obj = SHPCreateObject(SHPT_NULL,shape_id,1,part_index,NULL,points,x,y,z,NULL); } }else{ - if(notnull ==1){ + if(notnull > 0){ obj = SHPCreateObject(SHPT_ARCZ,shape_id,1,part_index,NULL,points,x,y,z,NULL); }else{ obj = SHPCreateObject(SHPT_NULL,shape_id,1,part_index,NULL,points,x,y,z,NULL); @@ -1001,13 +1001,13 @@ int create_points(char *str, SHPHandle shp,int dims){ obj = (SHPObject *)malloc(sizeof(SHPObject)); if(dims == 0){ - if(notnull == 1){ + if(notnull > 0){ obj = SHPCreateSimpleObject(SHPT_POINT,1,x,y,z); }else{ obj = SHPCreateSimpleObject(SHPT_NULL,1,x,y,z); } }else{ - if(notnull == 1){ + if(notnull > 0){ obj = SHPCreateSimpleObject(SHPT_POINTZ,1,x,y,z); }else{ obj = SHPCreateSimpleObject(SHPT_NULL,1,x,y,z); @@ -1047,13 +1047,13 @@ int create_multipoints(char *str, SHPHandle shp,int dims){ obj = (SHPObject *)malloc(sizeof(SHPObject)); if(dims == 0){ - if(notnull == 1){ + if(notnull > 0){ obj = SHPCreateSimpleObject(SHPT_MULTIPOINT ,1,x,y,z); }else{ obj = SHPCreateSimpleObject(SHPT_NULL ,1,x,y,z); } }else{ - if(notnull == 1){ + if(notnull > 0){ obj = SHPCreateSimpleObject(SHPT_MULTIPOINTZ ,1,x,y,z); }else{ obj = SHPCreateSimpleObject(SHPT_NULL ,1,x,y,z); @@ -1140,13 +1140,13 @@ int create_polygons(char *str,int shape_id, SHPHandle shp,int dims){ obj = (SHPObject *)malloc(sizeof(SHPObject)); if(dims == 0){ - if(notnull == 1){ + if(notnull > 0){ obj = SHPCreateObject(SHPT_POLYGON,shape_id,rings,part_index,NULL,max_points,totx,toty,totz,NULL); }else{ obj = SHPCreateObject(SHPT_NULL,shape_id,rings,part_index,NULL,max_points,totx,toty,totz,NULL); } }else{ - if(notnull == 1){ + if(notnull > 0){ obj = SHPCreateObject(SHPT_POLYGONZ,shape_id,rings,part_index,NULL,max_points,totx,toty,totz,NULL); }else{ obj = SHPCreateObject(SHPT_NULL,shape_id,rings,part_index,NULL,max_points,totx,toty,totz,NULL); @@ -1303,13 +1303,13 @@ int create_multipolygons(char *str,int shape_id, SHPHandle shp,int dims){ obj = (SHPObject *)malloc(sizeof(SHPObject)); if(dims == 0){ - if(notnull == 1){ + if(notnull > 0){ obj = SHPCreateObject(SHPT_POLYGON,shape_id,tot_rings,final_part_index,NULL,final_max_points,finalx,finaly,finalz,NULL); }else{ obj = SHPCreateObject(SHPT_NULL,shape_id,tot_rings,final_part_index,NULL,final_max_points,finalx,finaly,finalz,NULL); } }else{ - if(notnull == 1){ + if(notnull > 0){ obj = SHPCreateObject(SHPT_POLYGONZ,shape_id,tot_rings,final_part_index,NULL,final_max_points,finalx,finaly,finalz,NULL); }else{ obj = SHPCreateObject(SHPT_NULL,shape_id,tot_rings,final_part_index,NULL,final_max_points,finalx,finaly,finalz,NULL); -- 2.40.0