[mapguide-users] Tool tips and Labeling

Johann Muller johannfm at gmail.com
Fri Aug 25 02:35:04 EDT 2006


That is strange, here is one that i just tried. The " symbols are just 
there because there is spaces in the filename.

/C:\street_data>shp2pgsql "Street 5m Buffer.shp" buffer > buffer.sql
Shapefile type: Polygon
Postgis type: MULTIPOLYGON[2]
/
Then the beginning of my buffer.sql:
/
BEGIN;
CREATE TABLE "buffer" (gid serial PRIMARY KEY,
"prefix" varchar(2),
"name" varchar(50),
"type" varchar(15),
"suffix" varchar(2),
"full_name" varchar(50),
"alt_name" varchar(50),
"label" varchar(50),
"route" varchar(30),
"roadclass" varchar(10),
"category" varchar(20),
"province" varchar(30),
"municipal" varchar(50),
"cityname" varchar(30),
"oldcity" varchar(35),
"sub_left" varchar(35),
"sub_right" varchar(35),
"f_zlev" int2,
"t_zlev" int2,
"oneway" varchar(2),
"ramp_flag" varchar(1),
"br_flag" varchar(1),
"tn_flag" varchar(1),
"meters" numeric,
"speed_lim" int2);
SELECT AddGeometryColumn('','buffer','the_geom','-1','MULTIPOLYGON',2);/

Once you have the buffer.sql you need to run this script on your 
database to import the data.
The usage of the sh2sqlpgsql is as follows
shp2pgsql shape_file table_name > output_sql_file

Maybe try the following:
*shp2pgsql D:\roads.shp roads > d:\roads.sql
***Then go to the D: drive and the contents of the file roads.sql

Hope this helps.

//sukalyan chakraborty wrote:
> roads.sql is blank after running this .
> and it is running if i provide the commnd
> *shp2pgsql D:\roads.shp roads.sql *
> then postgre running the command and showing the extraction data from 
> shp file but
> i'm sorry to say u that after that also the roads.sql file is blank.
> i'm also unable to see the database from postgre database window.
>
>
>  
> On 8/25/06, *Johann Muller* <johannfm at gmail.com 
> <mailto:johannfm at gmail.com>> wrote:
>
>     Is there any errors that occur when you run the command?
>     And what is the contents of *roads.sql *after you have run the
>     command?
>
>
>     sukalyan chakraborty wrote:
>>     thanks a lot i've started my jouney on Shortest path
>>     calculation.. at the path of my journey
>>     i'm facing problem on *shp2pgsql D:\roads.shp roads > roads.sql
>>     *to convert the sql file into postgreSQL 8 format. it is not
>>     converting. Is there any help with anybody??
>>
>>
>>      
>>     On 8/19/06, *Jason Birch* <Jason.Birch at nanaimo.ca
>>     <mailto:Jason.Birch at nanaimo.ca>> wrote:
>>
>>         There is no direct routing (or geocoding) capability in
>>         MapGuide.  However you could implement this at the database
>>         level.  Here's a link that might help:
>>
>>         http://chris.narx.net/2005/12/14/build-your-own-routing-solution/
>>
>>
>>         I'm not sure if this will work with the OGR provider for
>>         PostGIS.
>>
>>         I guess you could set up a table that contains a cross
>>         product of all the nodes, along with the routes between them
>>         and the relative costs.  This could get very, very large though.
>>
>>         Also, you'd have to build some logic to extract the portions
>>         of the lines between the start/destination points on the line
>>         and the nodes at the start/end of the shortest route.
>>
>>         You'd probably want to use a few different weighting
>>         mechanisms too:  distance, speed, fewest left turns, etc.
>>
>>         This feature isn't of huge use to me, but I think it should
>>         be high on the wishlist.
>>
>>         Jason
>>
>>
>>         ________________________________
>>
>>         From: sukalyan chakraborty [mailto:
>>         chakraborty.sarkar at gmail.com
>>         <mailto:chakraborty.sarkar at gmail.com>]
>>         Sent: Fri 2006-08-18 11:28 PM
>>         To: users at mapguide.osgeo.org <mailto:users at mapguide.osgeo.org>
>>         Subject: Re: [mapguide-users] Tool tips and Labeling
>>
>>
>>         Thanks a lot i've solved my problem
>>
>>         Now can any body help me how can i implement a routing
>>         algorithm on  mapguide to find
>>         the shortest path and as well as all posible path.
>>
>>         Is there any help or link available.
>>
>>
>>         --
>>         Thanks A Lot
>>         Have A Nice Time
>>         Have Fun
>>         Be Jolly
>>         Sukalyan Chakraborty
>>         [Software Developer]
>>
>>         ---------------------------------------------------------------------
>>         To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
>>         <mailto:users-unsubscribe at mapguide.osgeo.org>
>>         For additional commands, e-mail:
>>         users-help at mapguide.osgeo.org
>>         <mailto:users-help at mapguide.osgeo.org>
>>
>>
>>
>>
>>     -- 
>>     Thanks A Lot
>>     Have A Nice Time
>>     Have Fun
>>     Be Jolly
>>     Sukalyan Chakraborty
>>     [Software Developer] 
>
>
>
>
> -- 
> Thanks A Lot
> Have A Nice Time
> Have Fun
> Be Jolly
> Sukalyan Chakraborty
> [Software Developer] 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide_users/attachments/20060825/98555b96/attachment.html


More information about the Mapguide_users mailing list