Re: [MI-L] GeoTracker and Garmin GPSMap76CSx
Tony, Here is the sequence of events that worked for me. Start your computer. Turn on the GPS unit. After the computer boots up, plug the GPS Unit into the USB port. Let the computer recognise the new hardware. Start up Mapinfo and run the Geotrack.mbx Then start Geotracker. This was the only way I could get a USB GPS unit to work on my computer with version 8.0 of Mapinfo and version 3.3 of Geotracker. Hope this is of some help. Regards, Jon Gramm ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Re: [MI-L] Universal Translator
Christine, There may be some database table fields that are greater in length than 254 characters. Also, you mave have too many fields that are of 254 characters. I receive files like this all of the time, the way to get them to work is to restructure the .DBF file included with the shape files. I use Visual Foxpro to do this. I will open the .dbf file of the offending shape file a modify the structure there. You can use other programs that will open a .dbf file to modify the structure. Many times the table will contain fields that have way more characters than necessary. Social Security fields, Phone Number fields, Addresses, States, Provinces, etc. Reduce the field size to something realistic and workable and you might get the shape file to work. I hope this helps. Regards, Jon Gramm ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Re: [MI-L] E-mailing TAB file sets
Listers, I have seen this problem before and it goes beyond just renaming the extension. Certain text files if they contain symbols such as a single or double quote followed by a space can actually lose those characters in the text file. I have only seen this when receiving mail sent using Outlook, Outlook Express, and Earthlink or Outlook and other providers. AOL is on the receiving end. Outlook to Outlook using Earthlink does not always produce the problem. IF the file is zipped, there are no problems. When the text files are sent from AOL, the data remains uncorrupted. Also AOL to AOL, the data is fine. This is not an endorsement of AOL by any means, just what I have seen from my experience. I would carefully look at the contents of the .tab files in a text editor to see if anything is corrupted. I have not seen anything get corrupted, but I have never just sent or received Mapinfo files that were uncompressed. My suggestion is to compress everything be sending, and request the same of the people sending you files. One other suggestion, Use an external compression program, rather than the one that your ISP might provide internally. I have seen problems when attaching multiple files directly within AOL. Zip the files before signing on. (Paranoia on my part? Maybe, Maybe Not.) Regards, Jon Gramm ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Re: [MI-L] Need US Infrastructure Data
Kent, The truth is that the data is not truly available unless you do a One Call (Call for locations) in the area that you are interested. The databases in the county courthouses are out of date at best. There are new pipelines being buried on a daily basis. The data is not necessarily provided to the county in a timely fashion. You will then be assigned a case number, and the companies with assets in that area will be notified. The contact information that you provide will be passed on to those companies. The location service does not discriminate, all companies with buried assets will be notified. The companies will contact you and arrange a time to meet with you or a representative of your company. You will then be able to physically map the right-of-way for the buried asset. You might be fortunate and have companies that have their own GIS database with the locations of their assets, but don't count on it. Legislation has been passed requiring all pipelines be mapped and pigged (scoped internally) It will be 2007 before any results of this legislation will be seen in earnest. There is also the homeland security issue to contend with in some cases. Nothing is insurmountable, it is just time consuming. Of all of the states that I have worked in that uses a One Call system, Louisiana seems to be the best organised. I hope this is of some help. Happy Holidays, Jon Gramm ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
Re: [MI-L] Need GPS Unit to produce Snail Trail that ccan be added to Existin...
The Delorme Earthmate Consumer Grade Antenna works very well with Geographic Tracker (The latest version) The price was right $179.00 which included Delorme's TopoUsa and StreetAtlas. It is a simple USB connection with a suction cup mount antenna, I taped mine down (it was on a boat.) The antenna has about twelve feet of cable. The trick to getting it to work with Geographic Tracker is to have the Antenna hooked up first and the Delorme GPS interface software running before you start Mapinfo and Geographic Tracker. After that it is very simple to draw lines or points in your editable layer. One other thing, it is very important to have the projection of all of your layers set to WGS84. Beyond that, it is almost a no-brainer. Hope this Helps. Regards, Jon Gramm ___ MapInfo-L mailing list MapInfo-L@lists.directionsmag.com http://www.directionsmag.com/mailman/listinfo/mapinfo-l
MI-L Problems with Select in a Mapbasic Program
Hello Listers, I have a Mapbasic Program that is supposed to Select all the records from a table, order them by a specific column, into another table and commit the table as another table. The problem is the program gives me an error stating the Expression does not evaluate to a column or table name The column that I wish the selection ordered by does exist in the table that I am trying to make the selection from. I am stumped. Any Help would be greatly appreciated. Thanks, Jon Gramm Code Below: Offending line in Red Print Starting Culture Shot Selection Select * from Culture_Shot_Styles Order By Map_Point_Layer Into Draw_Layers Commit Table Draw_Layers as Style_Table Open Table Style_Table Drop Table Draw_Layers Fetch first from Style_Table Do While Not EOT (Style_Table)
Re: MI-L How Do I Create A Centroid That's Always INSIDE a Region?
Bill, Split the difference between nodes of the diagonal angle points ) Long_leg_mid_pt_x =((x1 + x2) /2)) Long_leg_mid_pt_y = ((y1 + y2) / 2)) Then do the same thing with the new midpoint and the node at the intersection of the two short legs. Point_in_center_x =((Long_leg_mid_pt_x + Short_legs_intersection_x)/2)) Point_in_center_x =((Long_leg_mid_pt_y + Short_legs_intersection_y)/2)) Sorry for the ugly code and I hope this is what you are asking for. If not, sorry for being such a bonehead. Regards, Jon Gramm
Re: MI-L extracting lat/long coordinates for each node in a table of polygons
Erin, You could export the table to an MID/MIF file. This will create a text file with each of the nodes of the polygons. Then you can view either of the files in an text editor to format them how you like. Hope this helps. Jon Gramm
Re: MI-L MapInfo Not Responding
Christine, You will probably need to go to the Documents and Settings\Local Settings\Temp folder for the Owner or whatever the Primary user or Administrator has named the folder and delete the .tmp files. If you have over of any one file type, Windows will balk, and Mapinfo will crash. You might want to delete the queries programmatically after the routine is finished with each query that way you won't accumulate an excess number of queries (.tmp) files. Below is some Mapbasic code that is very ugly but might work. and I am sure there are many other better ways to do this and some of the other listers will probably give you a better solution, but you can give this a try. Dim query_count as integer Query_count = 1 Select * From IH_All_Babies Where Study_# In (Select Study_# From Matched) IF SelectionInfo(SEL_INFO_NROWS) 0 then '***Insert Your other Code Here, Update fields etc. Drop table selection Drop table Query + query_count query_count = query_count + 1 end if Please be advised that I think this will only work in a Mapbasic program and not in the Mapbasic window. But the first thing I would do would be to delete all of the .tmp files. Regards and I hope this helps, Jon Gramm
Re: MI-L selecting from a table without getting the mapping objects
Robert, Maybe you could try exporting the selection as a dbf file. Or you Save Copy As and choose the Selection then choose the file type that suits your needs the best. I hope this is of some assistance. Jon Gramm
Re: MI-L Lat/Long of nodes polygon
Troy, You could export the Polygon as an Mid/Mif file if the polygon is in Lat/Long in the first place. Hope this Helps, Jon Gramm
Re: MI-L File corruption
One question would be whether or not you are doing a lot of queries before updating. You might have exceeded the 1 file limit in the temp folder for .tmp files. I have had a similar error except I was told that I did not have enough memory and the program crashed. I don't know if this is related or not. Check your temp folder for a bunch of .tmp files (these would be Mapinfo queries). If there are of them then that might be the problem. If it is then you will need to rewrite your Mapbasic code if you are using any to delete the queries after you are finished with them. Hope this helps, Jon Gramm
Re: MI-L Cracking .NET Assemblies (was Dot NET and the Future of MapInfo App...
I don't see why anyone would want to by an Obfuscation package when they can hire me. I can't even read my own code. On a more serious note, everyone knows there is big money in security, whether it be Homeland or Software, or even Social. When it comes to the software side there are going to be a lot of people scrambling with DOT NET to make it secure and to protect their intellectual properties. I had read somewhere (Maximum PC) that DOT NET and C# was more secure than C++. It stated there were fewer weaknesses with the code and compiler, however it seems that the converse is true if you are using the MSIL. The Managed and Unmanaged Extensions using C++ seems to be a real pain in the Nether Regions. (My apologies to the Dutch). I am not real sure if I truly like any of the solutions being offered. I have written Mapbasic code for a long time, and while I have created anything earthshaking. (Well actually I have, since I write code for the Geophysical Exploration Industry) I have made a decent living with Mapinfo/Mapbasic The DOT NET coding scheme in Visual Basic and Visual C# will create many more lines of code than what we are accustomed to with Mapbasic. I have written some Visual Basic Script for another GIS package and compared it to what I have written in Mapbasic for the same functionality. I found the Visual Basic Script to be substantially larger, more commands, declarations, words what have you. And while the Drag and Drop programming of Visual Studio DOT NET can be very appealing I for one prefer to do my own typing. I also come from a Visual Foxpro background and have found it to be very easy to code in. Creating forms etc is very simple, and creating the code behind those forms and the buttons, listboxes and other events is very straightforward. You don't see all of the surrounding code as you do in Visual Studio which takes you to the entry point for the event on the form. Maybe I am a dinosaur, but sometimes over-simplification leads to confusion. In the good old days the programs we wrote and ran were procedural, and we needed more capability than that. Then Event driven programs with a user interface were introduced and it was a good thing. The problem is that procedures are being ignored as well as methodology. I write code that is full of holes, but I know where they are and how to deal with them and fortunately I haven't been kicked off the planet for some of the things that I have written. With the new development environments (Studio's) more people are going create even sloppier code than I do and then when something goes wrong they won't know where to look because they bought an Obfuscator to protect their intellectual property. This whole thing just gave me a Migraine. Sorry for the rant, well actually I am not sorry. Fellow Listers, Have a Happy Holidays Jon Gramm
Re: MI-L MapBasic vs VisualStudio .NET
I believe the next version of the Microsoft development platform will be named ToeTheLine.TRAP Great List and discussion. Jon Gramm
MI-L Re: FileExists problem Sum
Listers: Greetings and Hallucinations from the Road of Code. Again thank you for all of the help. It is true that the following code fail if the file is not already open. If FileExists(proj_map_dir + SP_In_No_Source_Buffer.tab) Then Drop Table SP_In_No_Source_Buffer End If However, the way the mapping project and workspaces are set up the file if it exists will be open. I suppose the way around this if the file was not open would be to have the program kill files. If FileExists(proj_map_dir + SP_In_No_Source_Buffer.tab) Then Kill (proj_map_dir + SP_In_No_Source_Buffer.tab) Kill (proj_map_dir + SP_In_No_Source_Buffer.dat) Kill (proj_map_dir + SP_In_No_Source_Buffer.map) Kill (proj_map_dir + SP_In_No_Source_Buffer.ID) End If In truth there are 10 files that this routines checks for the existence of, and if it finds them it deletes them. It then recreates the tables if certain types of points fall within the specific buffers. The next thing that I am going to work on is shortening the code by using .dbf files as a default file list for both the point files and the buffer files. The code will loop through both .dbf files and delete the existing files, create the necessary tables for the points that fall within the buffers. It will save a couple hundred lines of code. I will be happy to post it when I am finished if anyone is interested. Then only caveat would be that it will not be very generic and it might take some re-coding to work in your applications. Regards, Jon Gramm
MI-L Re:FileExists Problem Sum
Listers, Thank You all for the assistance. The correct code is as follows. If FileExists(proj_map_dir + SP_In_No_Source_Buffer.tab) Then Drop Table SP_In_No_Source_Buffer End If I don't know what I was thinking with all of the other nonsense that I tried. Thanks Again, Jon Gramm
MI-L FileExists problem
Hello Listers, I seem to have a problem with some code I have written to determine if a file exists. In theory the code should delete the table if it exists and carry on if it doesn't. However it does not seem to delete the file if it finds it. I have tried about a bazillion different versions of the code and none of them seem to work properly. I had initially tried to dimension BaseFile as Logical however the FileExists command did not seem to return an actual true or false value (Zero or non-Zero) In many cases it returned TSP_In_No_Source_Buffer to the Print Statement. Below is a snippet of the code that is giving me trouble. ' Dim proj_name1 as String Dim proj_name as String Dim proj_dir As String Dim proj_map_dir As String Dim BaseFile as STRING Set Coordsys Window Frontwindow() Register Table C:\stisoft\tdcseis.dbf type DBF Open Table c:\stisoft\tdcseis select * from tdcseis where status = .T. into map_dir proj_name = Rtrim$(map_dir.projdbf) proj_dir = Rtrim$(map_dir.def_dir)+\database\ proj_map_dir = RTrim$(map_dir.def_dir)+\mapping\ set event processing off set map redraw off set progressbars off 'Check for Existence of File and delete it if found '** Have also tried without any success. '** IF FileExists(proj_map_dir) + SP_In_No_Source_Buffer.tab '** Drop Table (proj_map_dir) + SP_In_No_Source_Buffer '** End If '** BaseFile = FileExists(proj_map_dir) + SP_In_No_Source_Buffer.tab Print BaseFile = + BaseFile If Basefile = T Then Drop Table(proj_map_dir) + SP_In_No_Source_Buffer Print Deleted Table SP_In_No_Source_Buffer END IF Select * from gp_postsp Where Julian_Date__Local_ 2004000 and obj within (Select obj from B_No_Sources) into Bad_SP IF SelectionInfo(SEL_INFO_NROWS) 0 Then SP_in_no_source = SelectionInfo(SEL_INFO_NROWS) Commit Table Bad_SP as (proj_map_dir) + SP_In_No_Source_Buffer Drop table Bad_SP Open Table (proj_map_dir) + SP_In_No_Source_Buffer Create Map for SP_In_No_Source_Buffer Coordsys Window Frontwindow() Add Map Layer SP_In_No_Source_Buffer Set Map Layer SP_In_No_Source_Buffer Editable On Coordsys Window Frontwindow() Distance Units survey ft Distance Type Cartesian XY Units survey ft sSymbolAttr = (73,16711680,14,MapInfo Miscellaneous,256,0) sCmd = Set Style Symbol MakeFontSymbol + sSymbolAttr Run Command sCmd Update SP_In_No_Source_Buffer Set obj = CreatePoint(Local_Easting,Local_Northing) Commit Table SP_In_No_Source_Buffer Else SP_in_no_source = 0 End If '* * Any suggestions would be greatly appreciated.. Jon Gramm
MI-L Creating or Modifying points
Hello Listers. I am having problems with the following portion of code to generate points where Helicopters are able to access. When I run the code I get an error that says Found[] while searching for [)] Invalid or Missing Argument List. The MapBasic code compiles without error. Select * from postsrc Where plan_src = HD IF SelectionInfo(SEL_INFO_NROWS) 0 then sSymbolAttr = (91,65535,10,'MapInfo Transportation',257,0) sCmd = Set Style Symbol MakeSymbol + sSymbolAttr Run Command sCmd Update Selection Set obj = CreatePoint(CentroidX(obj),CentroidY(obj)) End if The sSymbolAttr is dimensioned as a string The sCmd is dimensioned as a string If I just use Mapinfo 3 symbols such as (31,255,12) the program works fine. Any help or suggestions would be appreciated. Thanks, Jon Gramm
Re: MI-L Creating or Modifying points
Jacques, Thank You very much for your quick reply. You sent me along the right track. I indeed needed to set the style as a MakeFontSymbol. However using the Chr$(34) for the double quotes gave me a compiler error stating that it found MapInfo. I inserted double quotes and everything worked fine. Now here is a strange one. I have a program that changes the symbols of points that are imported on a daily basis from shape files. ( We use a Trimble Geoexplorer 3 with Pathfinder office to export the shape files. ) After creating MapInfo Tab files using the Universal Translator, we use a program that I wrote that will change the Point, Line, and Area styles of the Daily Mapping files to styles that are contained in shape_points.dbf, shape_lines, shape_areas.dbf files. The Styles dbf files have fields that define the various styles desired for the various cultural items in the daily mapping files. (Kind of a MapInfo Geodatabase if you wish to that type of Obscene term) The styles have both Fonts and Symbols in the defining fields and yet it all works flawlessly. Go figure. MapBasic is a wonderfully perplexing thing at times. Thank You again for the Help. Jon Gramm
MI-L DBMS Connection Using Lotus Notes Error
Hello Listers, I have encountered a problem trying to open a table from a DBMS Connection to Lotus Notes Release 6 MapInfo Version 7.0 The Connection is easily made, and I am able to choose from the Open Table Dialog Box the Lotus Connection. It displays all of the Tables that are available and I am able to set the Table filter and that seems to work just fine. However when I choose the View that I would like to create a table from I get an error that states Cannot Open Table for Live Access, A Single Numeric Key Column is Required on the Table What I think that means is that it needs something similar to a Record ID field to index the table or view with, however none of the tables or views in the Notes Database have any Record ID fields or any type of Indexing. I was just looking for any suggestions or workarounds. Any would be appreciated. Thank You, Jon Gramm Survey Technologies
MI-L Mapbasic Program Problems
Greetings, My dilemma is this. I have written a mapbasic program that is designed to change the Line Style of many different lines in different layers to specific line styles. The program registers a .dbf file that contains the names of the layers to edit, the feature types to edit, and the line styles to change the features to. The fields are named Shp_Layer, Map_Event, Map_Line, Pen_Line respectively. The Program fetches the first line of the .dbf file and checks for the existence of the Map_Layer, if the Map_layer exists it is then supposed to alter the existing line style to the style that resides in Pen_Line field of the .dbf file. The problem that arises is that I get an error stating that the program was unable to convert the data. The program properly selects the Map_Event however it does not seem to set the Pen Style properly I am including the troublesome code Below I do not wish to Hardwire the Line styles for this program since it needs to be rather dynamic for given projects. I am sorry for the ugly code and all of the comments, I have pulled out all of my remaining hair and started working on my cat. (Just Kidding) source_layer1 = shape_Lines.daily_lyr (This is a String) source_layer = Rtrim$(SHAPE_lines.daily_lyr) shape_layer = shape_path + source_layer + .tab event_type = shape_lines.map_event(This is a String) STRINGSYM = shape_lines.pen_line(This is a String) newsymb = shape_lines.pen_line (This is a String) newsymb = Rtrim$(newsymb) 'Line_style = shape_lines.map_line - sPenattr = newsymb or sPenattr = shape_lines.map_line I have tried this as both a String and a Pen 'Set Style Pen newsymb ' Run Command Set Style Pen + Newsymb if FileExists(shape_layer) 0 then set map layer source_layer1 editable on query_count = 1 Select * from Source_Layer1 where Rtrim$(Feat_type) = Rtrim$(event_type) 'Into Make_file If SelectionInfo(SEL_INFO_NROWS) 0 then 'Fetch first from Make_file } 'Select_counter = 1 } } 'Do While Not EOT(Make_file) } ' Select obj from Make_file } ' Where RowID = Select_counter } ' into Line_obj} 'Select * from line_obj} 'Pen_style = ObjectInfo(Selection.obj, OBJ_INFO_PEN)} 'qc = query + query_count} 'region_style = MakeBrush(34,PCOLOR,-1) } 'pen_style = MakePen(2,5,PCOLOR) } 'set style Pen pen_style} 'set style Brush region_style } Select object from selection into Line_obj 'Sel_obj = selection.obj -- I have used the remaining code sucessfully in other programs Alter Object Sel_obj Info OBJ_INFO_PEN, sPennatr Update Selection Set obj = Sel_obj 'Close Table Selection Commit table source_layer1 'Fetch next from Make_file 'Select_counter = Select_counter + 1 'Loop end if End if fetch next from Shape_lines select_counter = 0 Loop end sub '* *** The program Compiles in several different iterations, however it never works properly. Is it possible to convert a string to a pen? the map_line field contains data such as this Pen(2,73,16711680) the pen_line field contains data such as this MakePen(2,73,16711680) Any advice would be greatly appreciated. Regards, Jon Gramm Flat Earth