[postgis-devel] GUI Time

Paul Ramsey pramsey at opengeo.org
Mon Jan 5 07:34:30 PST 2009


shp2pgsql.c will remain, untouched. Once the new stuff is ready to  
test, I'll just commit it along-side. We can remove the old version  
once we're certain we like the new ones.

I'm planning on using the shp2pgsq-core.o object in both the  
executables, so that's kind of like a library :)

P.

On Jan 5, 2009, at 2:18 AM, Mark Cave-Ayland wrote:

> Paul Ramsey wrote:
>
>> Hi folks,
>> My Christmas present to myself was trying to do a GUI for shape  
>> importing (and eventually exporting). It turned out the GUI wasn't  
>> too hard... unfortunately when it came time to bolt in the actual  
>> guts, the crufty legacy code got in the way... the assumption of  
>> emitting to stdout is pretty backed in. So getting this working is  
>> going to take a pretty radical re-work. I'll work off to the side  
>> of the existing code, and create three new bits:
>> shp2pgsql-core.c  - where the work gets done
>> shp2pgsql-gui.c  - the gui frontend
>> shp2pgsql-cli.c  - the commandline frontend
>> Best,
>> P.
>
> Yup indeed. I did some testing on liblwgeom over Christmas (see  
> email to follow over the next few days) and realised that the  
> existing dual memory model is just plain bad.
>
> My feeling is that we need to get liblwgeom to the point where we  
> can rip out the lwgeom_init_allocators() callback and handle the  
> memory management/errors ourselves, so this would be one less thing  
> for you to worry about.
>
> But yeah, the loaders aren't the best example of C coding around and  
> so I wouldn't be averse to them being reworked. Perhaps similar to  
> liblwgeom you could make shp2pgsql-core.c a static library which  
> gets linked into both the CLI and GUI versions? I'd suggest if this  
> is major work then it should go into a separate branch so that trunk  
> will work as is, and then import the code into trunk when you have  
> something tested that works.
>
>
> ATB,
>
> Mark.
>
> -- 
> Mark Cave-Ayland
> Sirius Corporation - The Open Source Experts
> http://www.siriusit.co.uk
> T: +44 870 608 0063
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel


--
Paul Ramsey
OpenGeo - http://opengeo.org
PostGIS is Love.




More information about the postgis-devel mailing list